:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --text: #1f2933;
  --muted: #6b7280;
  --border: #e7e2d8;
  --dark: #18222f;
  --dark-soft: #263445;
  --gold: #b89146;
  --gold-soft: #f4ead3;
  --danger: #b91c1c;
  --success: #16803c;
  --shadow: 0 10px 28px rgba(24, 34, 47, 0.10);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg, #f9f7f1, var(--bg), #eee9df);
  color: var(--text);
  min-height: 100vh;
}

header {
  background: rgba(24, 34, 47, 0.96);
  color: white;
  padding: 18px 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 26px rgba(0,0,0,0.18);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.brand {
  font-size: 22px;
  font-weight: 800;
}

nav {
  display: flex;
  gap: 10px;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 700;
}

nav a:hover {
  background: rgba(255,255,255,0.12);
}

main {
  padding: 32px;
  max-width: 1500px;
  margin: 0 auto;
}

.catalog-title {
  font-size: 36px;
  margin-bottom: 18px;
}

/* HOME */
.hero {
  background: linear-gradient(135deg, white, #fbf7ec);
  padding: 60px 34px;
  border-radius: 28px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.hero h1 {
  font-size: 46px;
  margin-bottom: 10px;
}

.hero p {
  font-size: 18px;
  color: var(--muted);
}

.button,
button {
  background: linear-gradient(135deg, var(--dark), var(--dark-soft));
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 800;
}

/* FILTER BAR */
.filter-bar {
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 18px;
  position: relative;
  z-index: 100;
}

.new-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-top-row {
  display: grid;
  grid-template-columns: 48px 170px 135px 135px 135px 135px 82px 70px;
  gap: 10px;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.filter-group label,
.hidden-search-input label {
  font-size: 11px;
  font-weight: 900;
  color: var(--dark);
}

.big-search-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 15px;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hidden-search-input {
  display: none;
}

.hidden-search-input.show-search {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hidden-search-input input {
  width: 100%;
  height: 46px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  font-size: 14px;
}

.search-btn,
.clear-btn {
  height: 42px;
  min-height: 42px;
  border-radius: 13px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.search-btn {
  background: #111827;
  color: white;
}

.clear-btn {
  background: #f3f4f6;
  color: #111827;
}

/* BRAND DARK BOX */
.vendor-dark {
  background: #e81b0d;
  padding: 9px;
  border-radius: 16px;
}

.vendor-dark label {
  color: white;
}

/* CHOICES DEFAULT LIGHT */
.choices {
  width: 100%;
  margin: 0;
}

.choices__inner {
  min-height: 42px !important;
  height: 42px !important;
  border-radius: 13px !important;
  border: 1px solid var(--border) !important;
  background: white !important;
  color: #111827 !important;
  font-size: 13px !important;
  padding: 4px 10px !important;
}

.choices__item,
.choices__item--selectable,
.choices__placeholder {
  color: #111827 !important;
}

.choices__list--dropdown,
.choices__list[aria-expanded] {
  background: white !important;
  color: #111827 !important;
  border: 1px solid var(--border) !important;
  border-radius: 13px !important;
  z-index: 9999 !important;
  overflow: hidden !important;
}

.choices__list--dropdown .choices__item--choice,
.choices__list[aria-expanded] .choices__item--choice {
  background: white !important;
  color: #111827 !important;
  padding: 10px 12px !important;
}

.choices__list--dropdown .choices__item--choice.is-highlighted,
.choices__list[aria-expanded] .choices__item--choice.is-highlighted {
  background: #eef2ff !important;
  color: #111827 !important;
}

/* ONLY BRAND DARK DROPDOWN */
.vendor-dark .choices__inner {
  background: #021649 !important;
  color: white !important;
  border: 1px solid #243457 !important;
}

.vendor-dark .choices__item,
.vendor-dark .choices__item--selectable,
.vendor-dark .choices__placeholder {
  color: white !important;
}

.vendor-dark .choices__list--dropdown,
.vendor-dark .choices__list[aria-expanded] {
  background: #0d1528 !important;
  color: white !important;
  border: 1px solid #243457 !important;
}

.vendor-dark .choices__list--dropdown .choices__item--choice,
.vendor-dark .choices__list[aria-expanded] .choices__item--choice {
  background: #0d1528 !important;
  color: white !important;
}

.vendor-dark .choices__list--dropdown .choices__item--choice.is-highlighted,
.vendor-dark .choices__list[aria-expanded] .choices__item--choice.is-highlighted {
  background: #2563eb !important;
  color: white !important;
}

.vendor-dark .choices__input,
.vendor-dark .choices__input--cloned {
  background: #16213d !important;
  color: white !important;
}

/* SUMMARY */
.catalog-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.catalog-summary div {
  background: white;
  padding: 9px 14px;
  border-radius: 999px;
  box-shadow: 0 5px 16px rgba(24,34,47,0.07);
  border: 1px solid var(--border);
  color: var(--muted);
}

.catalog-summary b {
  color: var(--dark);
}

/* PRODUCT GRID */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
  gap: 26px;
}

.product-card {
  background: var(--card);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.image-wrap {
  background: radial-gradient(circle at top, #ffffff 0%, #f2eee5 65%);
  padding: 18px;
  height: 255px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}

.image-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.product-info {
  padding: 18px;
}

.product-title {
  font-size: 18px;
  line-height: 1.35;
  margin: 0 0 12px;
  color: var(--dark);
}

.price {
  display: inline-block;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 14px;
  color: var(--dark);
  background: var(--gold-soft);
  padding: 6px 12px;
  border-radius: 999px;
}

.product-meta {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 1px dashed #eee8dc;
}

.meta-label {
  color: var(--muted);
  font-weight: 800;
}

.meta-row span:last-child {
  text-align: right;
  word-break: break-word;
}

.stock-good {
  color: var(--success);
  font-weight: 900;
}

.stock-low {
  color: var(--danger);
  font-weight: 900;
}

.hidden-row {
  display: none;
}

/* VARIANTS */
.variant-box {
  background: #fbf7ec;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  margin: 12px 0 14px;
}

.variant-step label {
  display: block;
  font-weight: 800;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.step-select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: white;
  font-size: 14px;
}

.variant-message {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  margin-top: 8px;
}

/* CATEGORY */
.category-intro {
  margin: 24px 0 10px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
  margin-top: 24px;
}

.category-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 26px;
  text-decoration: none;
  color: var(--dark);
  box-shadow: var(--shadow);
}

.category-name {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 10px;
}

.category-count {
  color: var(--muted);
  font-weight: 700;
}

/* PAGINATION */
.pagination {
  margin: 36px auto 0;
  background: white;
  padding: 18px;
  border-radius: var(--radius);
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  max-width: 600px;
}

.page-btn {
  background: linear-gradient(135deg, var(--dark), var(--dark-soft));
  color: white;
  padding: 11px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
}

.page-center {
  color: var(--muted);
  font-weight: 700;
}

/* LOGIN */
.login-box,
.panel {
  max-width: 460px;
  background: white;
  padding: 30px;
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

input {
  outline: none;
}

.error {
  background: #ffe1e1;
  color: #8a1111;
  padding: 11px 13px;
  margin-bottom: 15px;
  border-radius: 14px;
  font-weight: 700;
}

.login-page-wrap {
  min-height: calc(100vh - 220px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-box {
  width: 100%;
}

.login-icon {
  font-size: 40px;
  text-align: center;
  margin-bottom: 6px;
}

.login-box h1 {
  text-align: center;
  margin: 0 0 4px;
  font-size: 28px;
  color: var(--dark);
}

.login-subtitle {
  text-align: center;
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 14px;
}

.login-box label {
  display: block;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 7px;
  color: var(--muted);
}

.login-box input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 15px;
  margin-bottom: 18px;
  box-sizing: border-box;
  background: #fbfaf7;
}

.login-box input:focus {
  border-color: var(--gold);
  background: white;
}

.login-box button[type="submit"] {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  font-size: 15px;
  letter-spacing: .03em;
  margin-top: 4px;
}

/* ADMIN PANEL */
.admin-subtitle {
  color: var(--muted);
  margin: -8px 0 6px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.admin-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: white;
  border: 1px solid var(--border);
  border-top: 4px solid var(--gold);
  border-radius: 20px;
  padding: 22px;
  text-decoration: none;
  color: var(--dark);
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}

.admin-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(24,34,47,0.16);
}

.admin-card-icon {
  font-size: 30px;
}

.admin-card-title {
  font-size: 17px;
  font-weight: 900;
}

.admin-card-desc {
  font-size: 13px;
  color: var(--muted);
  flex: 1;
}

.admin-card-url {
  margin-top: 6px;
  font-size: 12px;
  font-family: "Courier New", monospace;
  color: #8a94a3;
  background: #f3f4f6;
  padding: 4px 8px;
  border-radius: 8px;
  width: fit-content;
}

.admin-card.danger {
  border-top-color: var(--danger);
}

/* RESPONSIVE */
@media (max-width: 1050px) {
  .filter-top-row {
    grid-template-columns: repeat(4, 1fr);
  }

  .big-search-icon {
    width: 100%;
  }
}

@media (max-width: 700px) {
  header {
    padding: 16px 18px;
    flex-direction: column;
    gap: 12px;
  }

  main {
    padding: 18px;
  }

  .filter-top-row {
    grid-template-columns: 1fr;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .pagination {
    flex-wrap: wrap;
  }
}

.general-search-form {
  display: grid;
  grid-template-columns: 1fr 90px 80px;
  gap: 10px;
  align-items: center;
}

.general-search-form input {
  margin: 0;
}

.general-search-form .search-btn,
.general-search-form .clear-btn {
  height: 46px;
}

.filter-chip-wrap {
  display: inline-flex;
  align-items: center;
  background: white;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 5px 16px rgba(24,34,47,0.07);
}

.filter-chip-main {
  padding: 9px 12px 9px 14px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.filter-chip-main b {
  color: var(--dark);
}

.filter-chip-main:hover {
  background: #f8fafc;
}

.filter-chip-x {
  width: 30px;
  height: 100%;
  min-height: 34px;
  background: #fee2e2;
  color: #991b1b;
  text-decoration: none;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid #fecaca;
}

.filter-chip-x:hover {
  background: #fecaca;
}

.account-card {
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 28px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.info-item {
  background: #f7f7f7;
  border-radius: 12px;
  padding: 12px;
}

.info-label {
  display: block;
  font-size: 12px;
  color: #777;
  margin-bottom: 4px;
}

.info-value {
  font-weight: 700;
}

.orders-grid {
  display: grid;
  gap: 16px;
}

.order-card {
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.order-row {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #eee;
  padding: 7px 0;
}

.order-row:last-child {
  border-bottom: none;
}

.order-row b {
  min-width: 150px;
  color: #333;
}

.receipt-item {
  background: #f7f7f7;
  border-radius: 12px;
  padding: 12px;
  margin-top: 12px;
}



.print-tag-btn {
  margin-top: 12px;
  width: 100%;
  height: 40px;
  border-radius: 12px;
  background: #111827;
  color: white;
  font-weight: 900;
}


.template-controls {
  background: white;
  padding: 16px;
  border-radius: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.template-controls label {
  font-weight: 800;
}

.template-controls input {
  width: 90px;
}

.designer-wrap {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.label-canvas {
  position: relative;
  background: white;
  border: 2px dashed #111827;
  box-shadow: 0 8px 22px rgba(0,0,0,.15);
  overflow: hidden;
}

.template-field {
  position: absolute;
  border: 1px dashed #999;
  padding: 2px;
  cursor: move;
  background: rgba(255,255,255,.75);
  overflow: hidden;
}

.template-field.selected {
  border: 2px solid #2563eb;
  background: rgba(219,234,254,.85);
}

/* .barcode-field {
  font-family: monospace;
  letter-spacing: 2px;
  text-align: center;
} */

.field-panel {
  width: 260px;
  background: white;
  padding: 18px;
  border-radius: 16px;
}


.field-panel label {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 700;
}

.field-panel input,
.field-panel select {
  width: 140px;
}

.template-field {
  position: absolute;
  border: 1px dashed #777;
  background: rgba(255,255,255,.82);
  cursor: move;
  overflow: hidden;
  box-sizing: border-box;
}

.template-field.selected {
  border: 2px solid #2563eb;
  background: rgba(219,234,254,.9);
}

.field-name-tag {
  position: absolute;
  top: 0;
  left: 0;
  background: #111827;
  color: white;
  font-size: 8px;
  line-height: 1;
  padding: 2px 4px;
  z-index: 5;
  pointer-events: none;
}

.field-content {
  display: block;
  padding-top: 10px;
  pointer-events: none;
}

.resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 12px;
  height: 12px;
  background: #2563eb;
  cursor: nwse-resize;
  z-index: 10;
}

.field-btn {
  border: 0;
  color: white;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.field-list-panel {
  width: 260px;
  min-width: 260px;
  background: #f8fafc;
  border-left: 1px solid #cbd5e1;
  padding: 12px;
  overflow-y: auto;
}

.field-list-row {
  background: white;
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.field-list-row:hover {
  background: #eff6ff;
}

.field-list-title {
  font-weight: 800;
  font-size: 14px;
}

.field-list-info {
  font-size: 11px;
  color: #475569;
  margin-top: 4px;
}

.print-tag-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.print-tag-qty {
  width: 55px;
  height: 42px;
  text-align: center;
  font-size: 16px;
  flex: 0 0 55px;
}

.print-tag-btn {
  height: 42px;
  flex: 1;
  min-width: 0;
}

.label-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(320px,1fr));
  gap:20px;
}

.label-card{
  background:white;
  border-radius:16px;
  padding:16px;
  box-shadow:0 2px 10px rgba(0,0,0,.08);
}

.label-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.label-receipt{
  font-size:24px;
  font-weight:700;
}

.label-customer{
  font-size:34px;
  font-weight:800;
}

.label-description{
  margin-top:15px;
  font-size:20px;
}

.label-tags{
  display:flex;
  gap:10px;
  margin-top:15px;
}

.label-tags span{
  background:#eef2f7;
  padding:6px 10px;
  border-radius:20px;
}

.label-phone{
  margin-top:10px;
}

.picked-up-badge{
  background:red;
  color:white;
  padding:6px 12px;
  border-radius:20px;
  font-weight:700;
}

/* LABEL ORDER PREVIEW */

.label-line-small {
  font-size: 12px;
  color: #777;
  margin-top: 3px;
}

.label-qty-badge {
  background: #dc2626;
  color: white;
  font-weight: 700;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.label-type-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0;
}

.label-type-badge {
  background: #2563eb;
  color: white;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.label-size-text {
  font-size: 12px;
  color: #666;
  font-weight: 600;
}

.label-preview-area {
  background: #f4f4f4;
  border-radius: 12px;
  padding: 18px;
  margin: 12px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.label-preview {
  background: white;
  border: 2px dashed #444;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  line-height: 1.05;
  text-align: center;
  overflow: hidden;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.label-preview-line {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
}

/* STICK ON
   0.9 x 0.5 */

.label-preview-stick {
  width: 90px;
  height: 50px;
  font-size: 11px;
}

/* IRON ON
   1.75 x 0.5 */

.label-preview-iron {
  width: 175px;
  height: 50px;
  font-size: 13px;
}

/* SAW ON
   2.25 x 0.5 */

.label-preview-saw {
  width: 225px;
  height: 50px;
  font-size: 13px;
}

.label-card-ready {
  background: #ecfdf3 !important;
  border: 2px solid #16a34a !important;
}

.label-card-picked {
  background: #f1f5f9 !important;
  border: 2px solid #64748b !important;
  opacity: 0.85;
}

.label-tags {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.label-buttons {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.label-page-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:18px;
}

.label-search-card{
  display:flex;
  align-items:center;
  gap:10px;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:14px;
  margin-bottom:18px;
  box-shadow:0 2px 10px rgba(0,0,0,.05);
}

.search-icon{
  font-size:20px;
}

.label-search-input{
  flex:1;
  border:none;
  outline:none;
  font-size:15px;
  background:transparent;
}

.label-search-btn{
  background:#2563eb;
  color:#fff;
  border:none;
  border-radius:10px;
  padding:10px 18px;
  cursor:pointer;
  font-weight:700;
}

.status-filter{
  display:flex;
  gap:10px;
}

.status-filter a{
  padding:10px 16px;
  border-radius:999px;
  text-decoration:none;
  background:#f1f5f9;
  color:#334155;
  font-weight:700;
}

.status-filter a.active{
  background:#2563eb;
  color:white;
}