:root {
  --pz-teal: #0f766e;
  --pz-teal-soft: #14b8a6;
  --pz-blue: var(--pz-teal);
  --pz-blue-dark: #0f172a;
  --pz-bg: #f2f5f9;
  --pz-border: #e2e6ee;
  --pz-text-main: #111827;
  --pz-text-muted: #6b7280;
  --pz-success: #00c859;
  --pz-danger: #ff3366;
}

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

body {
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--pz-bg);
  color: var(--pz-text-main);
  display: flex;
  min-height: 100vh;
}

a {
  color: var(--pz-teal);
  text-decoration: none;
}

a:hover {
  color: var(--pz-teal-soft);
  text-decoration: underline;
}

.layout {
  display: flex;
  width: 100%;
}

/* SIDEBAR */
.sidebar {
  width: 240px;
  background-color: var(--pz-blue-dark);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem;
}

.sidebar__logo {
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
  padding: 0;
}

.sidebar__logo img {
  max-width: 140px;
  height: auto;
}

.sidebar__nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar__nav-item a {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
  color: #e5e7eb;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.sidebar__nav-item a:hover {
  background-color: rgba(255, 255, 255, 0.06);
}

.sidebar__nav-item--active a {
  background-color: #ffffff;
  color: var(--pz-blue-dark);
}

.sidebar__nav-item--active a:hover {
  background-color: #ffffff;
  color: var(--pz-blue-dark);
}

.mobile-nav .sidebar__nav-item a {
  color: var(--pz-blue-dark);
}

.mobile-nav .sidebar__nav-item--active a,
.mobile-nav .sidebar__nav-item--active a:hover {
  background-color: rgba(15, 23, 42, 0.08);
}

.sidebar__footer {
  margin-top: auto;
  font-size: 0.75rem;
  color: #9ca3af;
  padding-left: 0.5rem;
}

/* MAIN AREA */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: 56px;
  background-color: #ffffff;
  border-bottom: 1px solid var(--pz-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  gap: 1rem;
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar__title {
  font-size: 0.95rem;
  font-weight: 600;
}

.topbar__nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 0.5rem;
  border: 1px solid var(--pz-border);
  background-color: #ffffff;
  color: var(--pz-blue-dark);
  font-size: 1rem;
  cursor: pointer;
}

.mobile-nav {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 31, 0.45);
  display: none;
  align-items: flex-start;
  justify-content: flex-start;
  z-index: 1000;
  padding: 2rem 1rem 1rem;
}

.mobile-nav__panel {
  background: #ffffff;
  border-radius: 1rem;
  width: min(320px, 90%);
  padding: 1rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.mobile-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-weight: 600;
}

.mobile-nav__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--pz-blue-dark);
  cursor: pointer;
}

.mobile-nav--visible {
  display: flex;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--pz-text-muted);
}

.topbar__user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar__user-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--pz-border);
  background-color: #f8fafc;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.topbar__user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.topbar__user-name {
  font-weight: 600;
  font-size: 0.85rem;
}

.topbar__user-role {
  font-size: 0.7rem;
  color: var(--pz-text-muted);
  text-transform: capitalize;
}

.topbar__user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background-image: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 6px 12px rgba(37, 99, 235, 0.25);
}

.icon-button {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--pz-border);
  background-color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  color: var(--pz-text-main);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.icon-button:hover {
  background-color: #f3f4f6;
  color: var(--pz-blue);
}

.icon-button--danger {
  border-color: rgba(255, 51, 102, 0.4);
  color: var(--pz-danger);
}

.icon-button--danger:hover {
  background-color: rgba(255, 51, 102, 0.08);
  color: var(--pz-danger);
}

.content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.global-search-bar {
  margin-bottom: 1rem;
  background-color: #ffffff;
  border-radius: 1rem;
  border: 2px solid var(--pz-blue-dark);
  padding: 0.85rem 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pz-blue-dark);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  cursor: pointer;
}

.global-search-bar__text span {
  font-weight: 600;
}

.swal-search-results {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.swal-search-results li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.swal-search-results--modal {
  max-height: 260px;
  overflow-y: auto;
}

.swal-search-results li:last-child {
  border-bottom: none;
}

.swal-search-results a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.reprint-modal {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 1.25rem 1.5rem;
  max-width: calc(100vw - 2rem);
  box-sizing: border-box;
  overflow: visible;
}
.reprint-modal .swal2-html-container * {
  max-width: 100%;
  box-sizing: border-box;
}

.reprint-modal .swal2-title {
  font-size: 1rem;
}

.reprint-modal .swal2-html-container {
  font-size: 0.85rem;
  margin: 0;
  overflow: hidden;
  padding: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.reprint-modal .swal2-input,
.reprint-modal .swal2-select,
.reprint-modal .swal2-textarea {
  font-size: 0.85rem;
  display: block;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}
.reprint-modal .swal2-select {
  height: 38px;
  padding: 0.55rem 0.75rem;
  padding-right: 2rem;
  border-radius: 999px;
  border: 1px solid var(--pz-border);
  background-color: #ffffff;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1.41.59 6 5.17 10.59.59 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 10px 6px;
}

.refund-modal {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 1.25rem 1.5rem;
  max-width: calc(100vw - 2rem);
  box-sizing: border-box;
  overflow: visible;
}

.refund-modal .swal2-title {
  font-size: 1rem;
}

.refund-modal .swal2-html-container {
  font-size: 0.85rem;
  margin: 0;
  overflow-x: visible;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.refund-modal .swal2-input,
.refund-modal .swal2-select,
.refund-modal .swal2-textarea {
  font-size: 0.85rem;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}
.refund-modal .swal2-select {
  height: 38px;
  padding: 0.55rem 0.75rem;
  padding-right: 2rem;
  border-radius: 999px;
  border: 1px solid var(--pz-border);
  background-color: #ffffff;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1.41.59 6 5.17 10.59.59 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 10px 6px;
}

.swal2-popup .swal2-actions .swal2-styled {
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-weight: 600;
  border: 1px solid transparent;
  box-shadow: none;
}
.swal2-popup .swal2-actions .swal2-confirm {
  background: var(--pz-teal);
  color: #ffffff;
  border-color: var(--pz-teal);
}
.swal2-popup .swal2-actions .swal2-confirm:hover {
  background: var(--pz-teal-soft);
  border-color: var(--pz-teal-soft);
}
.swal2-popup .swal2-actions .swal2-cancel {
  background: #ffffff;
  color: var(--pz-text-main);
  border-color: var(--pz-border);
}
.swal2-popup .swal2-actions .swal2-cancel:hover {
  background: #f3f4f6;
}

.swal-sub {
  font-size: 0.8rem;
  color: var(--pz-text-muted);
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.pagination a {
  text-decoration: none;
  color: inherit;
}

.pagination .disabled {
  color: var(--pz-text-muted);
}

.pagination .current {
  font-size: 0.85rem;
}

.reprint-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.reprint-reason {
  font-size: 0.9rem;
  color: var(--pz-text-muted);
  margin: 0;
}

.reprint-actions {
  margin-top: auto;
}

.flash-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.flash {
  border-radius: 0.4rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  border: 1px solid var(--pz-border);
  background-color: #ffffff;
}

.flash--success {
  border-left: 4px solid var(--pz-blue);
}

.flash--danger {
  border-left: 4px solid var(--pz-danger);
}

.flash--info {
  border-left: 4px solid var(--pz-blue);
}

.flash--warning {
  border-left: 4px solid #f97316;
}

/* FILTERS */
.filter-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-row--center {
  justify-content: center;
}

.filter-chip {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--pz-border);
  font-size: 0.85rem;
  background-color: #ffffff;
  cursor: pointer;
  color: var(--pz-text-muted);
  font-weight: 600;
}

.filter-chip--active {
  background-color: var(--pz-blue);
  border-color: var(--pz-blue);
  color: #ffffff;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--pz-border);
  font-size: 0.8rem;
  font-weight: 600;
  background-color: #ffffff;
  color: var(--pz-text-main);
}

.chip--muted {
  background-color: #f8fafc;
  color: var(--pz-text-muted);
}

/* GRID */
.grid {
  display: grid;
  gap: 1rem;
}

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

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

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }
  .grid--3,
  .grid--2 {
    grid-template-columns: 1fr;
  }
  .customer-grid {
    grid-template-columns: 1fr;
  }
  .customer-grid__address {
    padding-left: 0;
    border-left: none;
    border-top: 1px solid var(--pz-border);
    padding-top: 0.75rem;
  }
  .customer-grid__details .detail-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
  .customer-address {
    align-items: flex-start;
    text-align: left;
  }
  .topbar__date {
    display: none;
  }
}

/* CARDS */
.card {
  background-color: #ffffff;
  border-radius: 1rem;
  border: none;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.hero-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card--stat {
  display: flex;
  align-items: center;
  gap: 1rem;
  border: none;
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
}

.card--stat .card__label {
  color: rgba(255, 255, 255, 0.8);
}

.card--stat .card__value {
  font-size: 2rem;
  font-weight: 600;
}

.card--stat .card__sub {
  color: rgba(255, 255, 255, 0.8);
}

.card__stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background-color: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.stat--orders {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.stat--revenue {
  background: linear-gradient(135deg, #ec4899, #f97316);
}

.stat--production {
  background: linear-gradient(135deg, #0ea5e9, #22d3ee);
}

.stat--customers {
  background: linear-gradient(135deg, #14b8a6, #22c55e);
}

.stat--completion {
  background: linear-gradient(135deg, #f97316, #fb7185);
}

.stat--response {
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
}

.stat--reprints {
  background: linear-gradient(135deg, #facc15, #f97316);
}

.stat--postsnap {
  background: linear-gradient(135deg, #0f172a, #475569);
}

.stat--dpd-active {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.stat--dpd-transit {
  background: linear-gradient(135deg, #0ea5e9, #38bdf8);
}

.stat--dpd-delayed {
  background: linear-gradient(135deg, #f97316, #f59e0b);
}

.stat--dpd-stale {
  background: linear-gradient(135deg, #475569, #94a3b8);
}

.stat--dpd-delivered {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}

.hero-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card--stat {
  display: flex;
  align-items: center;
  gap: 1rem;
  border: none;
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
}

.card--stat .card__label {
  color: rgba(255, 255, 255, 0.8);
}

.card--stat .card__value {
  font-size: 2rem;
  font-weight: 600;
}

.card--stat .card__sub {
  color: rgba(255, 255, 255, 0.8);
}

.card__stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background-color: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.stat--orders {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.stat--revenue {
  background: linear-gradient(135deg, #ec4899, #f97316);
}

.stat--production {
  background: linear-gradient(135deg, #0ea5e9, #22d3ee);
}

.stat--customers {
  background: linear-gradient(135deg, #14b8a6, #22c55e);
}

.stat--completion {
  background: linear-gradient(135deg, #f97316, #fb7185);
}

.stat--response {
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
}

.stat--reprints {
  background: linear-gradient(135deg, #facc15, #f97316);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--pz-border);
  font-size: 0.9rem;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row a {
  color: var(--pz-blue);
  text-decoration: none;
}

.detail-row a:hover {
  text-decoration: underline;
}

.order-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.order-actions form {
  margin: 0;
}

.order-actions__primary,
.order-actions__secondary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.order-actions__secondary {
  justify-content: flex-end;
}


.order-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.order-detail-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.order-detail-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.order-summary-card {
  padding-bottom: 1.5rem;
}

.order-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.order-summary-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pz-text-muted);
}

.order-summary-total {
  font-size: 2rem;
  font-weight: 600;
  margin-top: 0.1rem;
}

.order-summary-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-end;
  text-align: right;
}

.order-summary-date {
  font-size: 0.85rem;
  color: var(--pz-text-muted);
}

.order-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.order-summary-grid__item {
  padding: 0.75rem;
  border: 1px solid var(--pz-border);
  border-radius: 0.65rem;
  background-color: #f9fafb;
}

.order-summary-grid__label {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--pz-text-muted);
}

.order-summary-grid__value {
  margin-top: 0.25rem;
  font-weight: 600;
  color: var(--pz-text-main);
  word-break: break-word;
  text-transform: capitalize;
}

.customer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 1rem;
}

.customer-grid__details .detail-row {
  border-bottom: 1px solid var(--pz-border);
}

.customer-grid__details .detail-row:last-child {
  border-bottom: none;
}

.customer-grid__address {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-left: 1rem;
  border-left: 1px solid var(--pz-border);
}

.customer-grid__label {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--pz-text-muted);
}

.customer-link {
  font-weight: 600;
  color: var(--pz-blue);
  text-decoration: none;
}

.customer-link:hover {
  text-decoration: underline;
}

.customer-address {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-align: right;
  align-items: flex-end;
}

.customer-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.item-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 0.25rem;
  border: 1px solid var(--pz-border);
  cursor: pointer;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.item-card {
  display: flex;
  gap: 0.75rem;
  border: 1px solid var(--pz-border);
  border-radius: 0.5rem;
  padding: 0.75rem;
  height: 100%;
}

.item-card__body {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
}

.item-card__info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.item-card__info h4 {
  margin: 0;
  font-size: 0.95rem;
}

.item-card__download {
  margin-left: auto;
  align-self: flex-end;
}

.item-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.85rem;
  color: var(--pz-text-muted);
}

.item-card .icon-button {
  margin-top: 0;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.lightbox.visible {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card__sub {
  font-size: 0.8rem;
  color: var(--pz-text-muted);
}

.card--payment-builder {
  border: 1px solid var(--pz-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.payment-builder__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 0.75rem;
  max-width: 780px;
}

.payment-builder__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.payment-builder__fields--wide {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.input-chip {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid #dfe3eb;
  border-radius: 0.6rem;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.04);
}

.input-chip input {
  border: none;
  background: transparent;
  font-size: 0.95rem;
  outline: none;
}

.input-chip--xl input {
  font-size: 1.05rem;
  font-weight: 600;
}

.input-prefix {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.payment-builder__toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.3rem;
  border: 1px solid #dfe3eb;
  border-radius: 0.6rem;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.04);
  flex-wrap: wrap;
}

.payment-builder__toggle input[type="number"] {
  max-width: 320px;
  padding: 0.9rem 1rem;
  font-size: 1.05rem;
  line-height: 1.35;
  border: 1px solid #dfe3eb;
  border-radius: 0.5rem;
  height: 30px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
}

.input-chip--full {
  grid-column: 1 / -1;
}

.input-no-spinner::-webkit-outer-spin-button,
.input-no-spinner::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input-no-spinner[type=number] {
  -moz-appearance: textfield;
}

.input-wide {
  min-width: 260px;
}

.card--payment-result {
  border: 1px solid var(--pz-border);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.payment-result {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.5rem 0;
}

.payment-result__ref {
  font-weight: 600;
}

.payment-result__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn--inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.8rem;
}

.card__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card__title--spaced {
  margin-bottom: 0.9rem;
}

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

.accordion details summary {
  cursor: pointer;
  list-style: none;
}

.accordion details summary::-webkit-details-marker {
  display: none;
}

.accordion__toggle {
  font-size: 0.8rem;
  color: var(--pz-blue);
}

.card__list {
  list-style: none;
  font-size: 0.85rem;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card__list li {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--pz-border);
}

.card__list--empty {
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__list--empty .card__empty {
  padding: 0;
  border-bottom: none;
}

.card__empty {
  padding: 0.75rem 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__empty .card__sub {
  font-size: 0.9rem;
}

.tracking-events {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 2.4rem;
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.card__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.tracking-updates__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.tracking-updates__meta .icon-button {
  text-decoration: none;
}

.tracking-events li {
  padding: 0;
  border-bottom: none;
  flex: 0 0 255px;
}

@media (max-width: 720px) {
  .tracking-events li {
    flex: 0 0 220px;
  }
  .tracking-events {
    gap: 1.2rem;
  }
}

.tracking-event__chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 2.6rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--pz-border);
  border-radius: 999px;
  color: var(--pz-text-main);
  text-align: center;
  width: 100%;
  background: #fff;
}

.tracking-event__chip--delivered {
  background: var(--pz-teal);
  border-color: var(--pz-teal);
  color: #fff;
}

.tracking-event__chip--delivered .tracking-event__time {
  color: rgba(255, 255, 255, 0.72);
}

.tracking-event__chip--delivered .tracking-event__location {
  color: rgba(255, 255, 255, 0.72);
}

.tracking-event__title {
  font-size: 0.8rem;
  font-weight: 600;
}

.tracking-event__time {
  font-size: 0.72rem;
  color: var(--pz-text-muted);
}

.tracking-event__location {
  font-size: 0.72rem;
  color: var(--pz-text-muted);
}

.latest-order__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.latest-order__status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  text-align: right;
}

.latest-order__status .status-badge {
  white-space: nowrap;
}

.latest-order__time {
  font-size: 0.75rem;
  color: var(--pz-text-muted);
}

.reprint-list li {
  line-height: 1.4;
}

.reprint-list .card__sub {
  display: block;
  margin-top: 0.2rem;
}

.card__list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* CHART PLACEHOLDER */
.chart-card {
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* TABLES */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

thead {
  background-color: #f9fafb;
}

th,
td {
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid var(--pz-border);
  white-space: nowrap;
}

th {
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--pz-text-muted);
}

tr:hover td {
  background-color: #f3f4f6;
}

.order-row,
.customer-row,
.payment-row {
  cursor: pointer;
}

.col-order {
  font-weight: 600;
  color: var(--pz-blue);
}

.col-customer-main {
  font-weight: 500;
  display: block;
}

.col-customer-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--pz-text-muted);
}

.note-form {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.note-form textarea {
  width: 100%;
  border: 1px solid var(--pz-border);
  border-radius: var(--pz-radius-sm);
  padding: 0.6rem 0.8rem;
  font-family: inherit;
  resize: vertical;
}

.note-form__actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    flex-wrap: nowrap;
    height: auto;
    padding: 0.75rem 1rem;
  }

  .topbar__right {
    width: auto;
    margin-left: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 0.75rem;
  }

  .topbar__nav-toggle {
    display: inline-flex;
  }

  .content {
    padding: 1rem;
  }
}

/* BADGES */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status--printed {
  background-color: rgba(0, 200, 89, 0.08);
  color: var(--pz-success);
}

.status--waiting {
  background-color: rgba(15, 23, 42, 0.06);
  color: var(--pz-text-main);
}

.status--problem {
  background-color: rgba(255, 51, 102, 0.08);
  color: var(--pz-danger);
}

.status--shipped {
  background-color: rgba(15, 118, 110, 0.12);
  color: var(--pz-teal);
}

.badge-delivery {
  display: inline-flex;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--pz-border);
  font-size: 0.8rem;
  color: var(--pz-text-muted);
}

/* BUTTONS */
.btn {
  border-radius: 999px;
  border: 1px solid var(--pz-border);
  padding: 0.45rem 1rem;
  background-color: #ffffff;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--pz-text-main);
  font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  background-color: #f5f5f7;
}

.btn--primary {
  background-color: var(--pz-blue);
  border-color: var(--pz-blue);
  color: #ffffff;
}

.btn--primary:hover {
  background-color: var(--pz-teal-soft);
  border-color: var(--pz-teal-soft);
}

.btn--danger {
  background-color: #8b1111;
  border-color: #8b1111;
  color: #ffffff;
}

.btn--danger:hover {
  background-color: #6f0d0d;
  border-color: #6f0d0d;
}

.btn--full {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.btn--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.reply-attachments.is-collapsed {
  display: none;
}

.reply-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.reply-dropzone {
  position: relative;
  border: 1px dashed var(--pz-border);
  border-radius: 10px;
  padding: 0.85rem;
  text-align: center;
  background: #fbfcff;
  cursor: pointer;
  color: var(--pz-text-muted);
}

.reply-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.reply-dropzone.is-dragover {
  border-color: var(--pz-teal);
  background: #f2f6ff;
  color: var(--pz-text-main);
}

.reply-attachment-list {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--pz-text-muted);
}

.reply-attachment-item {
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--pz-border);
  background: #fff;
}

/* PAGE TITLES & LAYOUT */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.page-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.page-subtitle {
  font-size: 0.85rem;
  color: var(--pz-text-muted);
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.actions-row--center {
  justify-content: center;
}

.filter-select {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.filter-select select {
  border-radius: 999px;
  border: 1px solid var(--pz-border);
  background-color: #ffffff;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  min-width: 160px;
  appearance: none;
}

.filter-caret {
  position: absolute;
  right: 0.8rem;
  top: 0.1rem;
  pointer-events: none;
  font-size: 1rem;
  color: var(--pz-text-main);
  font-weight: 600;
}

.filter-select select {
  padding-right: 2rem;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--pz-border);
  font-size: 0.85rem;
}

.orders-filters {
  justify-content: center;
}

.search-input {
  background-color: #ffffff;
  border-radius: 999px;
  border: 1px solid var(--pz-teal);
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.search-input:focus-within {
  border-color: var(--pz-teal);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.18);
}

.search-input input {
  border: none;
  outline: none;
  font-size: 0.85rem;
  flex: 1;
}

/* AUTH PAGES */
.auth-body {
  min-height: 100vh;
  background-color: var(--pz-blue-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-page {
  width: 100%;
  max-width: 420px;
  padding: 2rem;
}

.auth-card {
  background: #ffffff;
  border-radius: 1rem;
  border: 1px solid var(--pz-border);
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}

.auth-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-logo img {
  max-width: 180px;
  height: auto;
  filter: invert(1);
}

.reports-customer-name {
  font-size: 0.85rem;
  line-height: 1.2;
  font-weight: 500;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pz-text-muted);
}

.auth-input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: 0.5rem;
  border: 1px solid var(--pz-border);
  font-size: 0.95rem;
}

.auth-submit {
  width: 100%;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--pz-text-muted);
}
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.settings-form input,
.settings-form select {
  border-radius: 0.5rem;
  border: 1px solid var(--pz-border);
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
}

.settings-form select {
  height: 38px;
  border-radius: 999px;
  padding-right: 2rem;
  font-size: 0.85rem;
  background-color: #ffffff;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1.41.59 6 5.17 10.59.59 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 10px 6px;
}

.settings-form textarea {
  border-radius: 0.5rem;
  border: 1px solid var(--pz-border);
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  resize: vertical;
}

.settings-form .btn {
  align-self: center;
  min-width: 180px;
  justify-content: center;
  margin-top: 1.5rem;
}

.inline-form {
  display: inline-block;
}

.inline-form select {
  border-radius: 999px;
  border: 1px solid var(--pz-border);
  padding: 0.55rem 0.75rem;
  padding-right: 2rem;
  font-size: 0.85rem;
  height: 38px;
  background-color: #ffffff;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1.41.59 6 5.17 10.59.59 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 10px 6px;
}

.input--monospace {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.chart-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.chart-compare {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chart-tab {
  border: 1px solid var(--pz-border);
  background-color: #fff;
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--pz-text-muted);
}

.chart-tab--active {
  background-color: var(--pz-blue-dark);
  color: #fff;
  border-color: var(--pz-blue-dark);
}

.chart-wrapper {
  position: relative;
  min-height: 220px;
}
