@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --zh-paper: #f7f7f4;
  --zh-paper-alt: #eeeeea;
  --zh-ink: #141414;
  --zh-ink-soft: #252525;
  --zh-fog: rgba(20, 20, 20, 0.62);
  --zh-hair: rgba(20, 20, 20, 0.14);
  --zh-panel: rgba(255, 255, 255, 0.86);
  --zh-panel-strong: rgba(255, 255, 255, 0.94);
  --zh-shadow: 0 14px 40px rgba(0, 0, 0, 0.08);
  --zh-danger: #b42318;
  --zh-danger-soft: #fef3f2;
  --zh-ok: #2f6f44;

  /* Compatibility tokens used by existing templates */
  --body-bg: var(--zh-paper);
  --card-bg-light-glass: var(--zh-panel);
  --card-border-light-glass: var(--zh-hair);
  --card-text-color: var(--zh-ink);
  --primary-accent-color: var(--zh-ink);
  --secondary-accent-color: #3f3f46;
  --box-shadow-light: 0 6px 16px rgba(0, 0, 0, 0.05);
  --box-shadow-strong: var(--zh-shadow);
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--zh-paper) !important;
  background-image: radial-gradient(circle at 15% -20%, #ffffff 0%, transparent 44%), linear-gradient(180deg, #f8f8f6 0%, #f1f1ed 100%), repeating-linear-gradient(90deg, transparent 0 34px, rgba(20, 20, 20, 0.02) 34px 35px);
  color: var(--zh-ink) !important;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif !important;
  line-height: 1.45;
}

h1,
h2,
h3,
h4,
h5,
h6,
.display-1,
.display-2,
.display-3,
.display-4,
.display-5,
.display-6 {
  color: var(--zh-ink);
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  font-weight: 650;
  letter-spacing: -0.01em;
}

p,
.small,
.text-muted,
.muted {
  color: var(--zh-fog) !important;
}

main.container.main-content {
  margin-top: 1.1rem !important;
  max-width: 1360px;
  padding-bottom: 4.5rem;
}

/* Console shell */
.zh-shell-header {
  position: sticky;
  top: 0;
  z-index: 1080;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(247, 247, 244, 0.95) 0%, rgba(247, 247, 244, 0.86) 100%);
  border-bottom: 1px solid var(--zh-hair);
}

.zh-console-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 1rem;
  min-height: 44px;
  border-bottom: 1px solid var(--zh-hair);
}

.zh-console-left,
.zh-console-center,
.zh-console-right {
  font-family: 'IBM Plex Mono', Consolas, monospace;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  color: rgba(20, 20, 20, 0.78);
}

.zh-console-center {
  justify-self: center;
  white-space: nowrap;
}

.zh-console-right {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  justify-self: end;
  white-space: nowrap;
}

.zh-status-pill,
.zh-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 30px;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--zh-hair);
  background: rgba(255, 255, 255, 0.8);
  color: var(--zh-ink);
}

.zh-status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--zh-danger);
  box-shadow: 0 0 0 1px rgba(180, 35, 24, 0.18), 0 0 8px rgba(180, 35, 24, 0.4);
}

.zh-status-pill.degraded .dot {
  background: #8a6d1f;
  box-shadow: 0 0 0 1px rgba(138, 109, 31, 0.2), 0 0 8px rgba(138, 109, 31, 0.4);
}

.zh-status-pill.offline {
  border-color: rgba(180, 35, 24, 0.3);
  background: var(--zh-danger-soft);
  color: #8e1d15;
}

.zh-status-pill.offline .dot {
  background: #8e1d15;
  box-shadow: none;
}

.zh-shell-nav {
  margin: 0.45rem auto;
  width: min(1240px, calc(100% - 1.25rem));
  border: 1px solid var(--zh-hair);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--zh-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.5rem 0.75rem;
  transition: transform 180ms ease, opacity 180ms ease;
}

.zh-shell-nav.hide-on-scroll {
  transform: translateY(-110%);
  opacity: 0;
}

.zh-shell-nav.show-on-scroll {
  transform: translateY(0);
  opacity: 1;
}

.zh-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--zh-ink);
  text-decoration: none;
  border-radius: 12px;
  padding: 0.35rem 0.5rem;
}

.zh-brand:hover,
.zh-brand:focus {
  color: var(--zh-ink);
  background: rgba(20, 20, 20, 0.06);
}

.zh-brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--zh-hair);
}

.zh-brand span {
  font-size: 1.02rem;
  font-weight: 680;
  letter-spacing: 0.06em;
}

.zh-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: center;
}

.zh-nav-link {
  min-height: 44px;
  min-width: 44px;
  border: 1px solid var(--zh-hair);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--zh-ink) !important;
  font-size: 0.93rem;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 0.65rem !important;
}

.zh-nav-link i {
  font-size: 0.95rem;
}

.zh-nav-link:hover,
.zh-nav-link:focus,
.zh-nav-link.active {
  background: var(--zh-ink);
  color: #fff !important;
  border-color: var(--zh-ink);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.16);
}

.zh-nav-label {
  font-family: 'IBM Plex Mono', Consolas, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.zh-user-chip {
  border: 1px solid var(--zh-hair);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.45rem;
}

.zh-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--zh-hair);
}

.zh-user-company {
  color: var(--zh-ink);
  font-size: 0.86rem;
  line-height: 1.1;
}

.zh-user-name {
  font-family: 'IBM Plex Mono', Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--zh-fog);
}

/* Core surfaces */
.card,
.card-glass,
.card-glass-bw,
.glass-header,
.widget,
.glass-metric-card,
.info-bar {
  background: var(--zh-panel) !important;
  border: 1px solid var(--zh-hair) !important;
  color: var(--zh-ink) !important;
  box-shadow: var(--zh-shadow) !important;
  backdrop-filter: blur(2px) !important;
  -webkit-backdrop-filter: blur(2px) !important;
}

.card-glass,
.card-glass-bw {
  border-radius: 16px !important;
}

.alert-glass {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid var(--zh-hair) !important;
  color: var(--zh-ink) !important;
}

.table,
.table-responsive {
  border-color: var(--zh-hair);
}

.table th,
.table thead th,
.sales-table-modern th {
  background: rgba(20, 20, 20, 0.9) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  font-family: 'IBM Plex Mono', Consolas, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.table td,
.sales-table-modern td {
  background: rgba(255, 255, 255, 0.82) !important;
  color: var(--zh-ink) !important;
  border-color: var(--zh-hair) !important;
}

.table-hover tbody tr:hover,
.sales-table-modern tr.sale-row:hover {
  background: rgba(20, 20, 20, 0.06) !important;
}

/* Buttons and controls */
.btn,
button,
input,
select,
textarea {
  border-radius: 12px !important;
}

.btn,
.btn-primary,
.btn-outline-primary,
.btn-outline-minimal,
.btn-primary-minimal,
.btn-glass,
.btn-success,
.btn-warning,
.btn-danger,
.btn-outline-danger,
.btn-outline-secondary,
.btn-secondary,
.form-control,
.form-select {
  min-height: 44px;
}

.btn,
.btn-outline-minimal,
.btn-outline-primary,
.btn-outline-secondary {
  border: 1px solid var(--zh-hair) !important;
  background: rgba(255, 255, 255, 0.88) !important;
  color: var(--zh-ink) !important;
}

.btn:hover,
.btn:focus,
.btn-outline-minimal:hover,
.btn-outline-primary:hover,
.btn-outline-secondary:hover {
  background: rgba(20, 20, 20, 0.1) !important;
  color: var(--zh-ink) !important;
}

.btn-primary,
.btn-primary-minimal,
.btn-glass,
.btn-success {
  border: 1px solid var(--zh-ink) !important;
  background: var(--zh-ink) !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary-minimal:hover,
.btn-primary-minimal:focus,
.btn-glass:hover,
.btn-success:hover {
  border-color: #000 !important;
  background: #000 !important;
  color: #fff !important;
}

.btn-danger,
.btn-outline-danger,
.toast-message.error,
.badge.bg-danger {
  color: #fff !important;
  background: var(--zh-danger) !important;
  border-color: var(--zh-danger) !important;
}

.text-danger {
  color: var(--zh-danger) !important;
}

.badge.bg-success {
  color: #fff !important;
  background: var(--zh-ok) !important;
  border-color: var(--zh-ok) !important;
}

.text-success {
  color: var(--zh-ok) !important;
}

.badge.bg-primary,
.bg-primary,
section.bg-primary {
  color: #fff !important;
  background: var(--zh-ink) !important;
}

.text-primary {
  color: var(--zh-ink) !important;
}

.text-info {
  color: var(--zh-fog) !important;
}

.badge.bg-info,
.bg-info {
  color: var(--zh-ink) !important;
  background: rgba(20, 20, 20, 0.12) !important;
  border-color: var(--zh-hair) !important;
}

.alert-info {
  color: var(--zh-ink) !important;
  background: rgba(20, 20, 20, 0.08) !important;
  border: 1px solid var(--zh-hair) !important;
}

.form-control,
.form-select {
  border: 1px solid var(--zh-hair) !important;
  background: rgba(255, 255, 255, 0.95) !important;
  color: var(--zh-ink) !important;
  box-shadow: none !important;
}

.form-select {
  padding-right: 2.25rem !important;
  background-position: right 0.68rem center !important;
  letter-spacing: normal;
  text-transform: none;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(20, 20, 20, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(20, 20, 20, 0.1) !important;
}

/* Keep checkboxes and switches compact; text-input sizing should not apply here. */
.form-check-input {
  min-height: 1rem !important;
  width: 1rem;
  height: 1rem;
  margin-top: 0.24rem;
  box-shadow: none !important;
}

.form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(20, 20, 20, 0.1) !important;
}

.form-switch .form-check-input {
  width: 2.25rem;
  min-height: 1.25rem !important;
  height: 1.25rem;
  margin-top: 0.1rem;
}

.badge {
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-family: 'IBM Plex Mono', Consolas, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 10px;
}

/* Footer and floating helpers */
.footer-nav {
  background: rgba(248, 248, 245, 0.96) !important;
  border-top: 1px solid var(--zh-hair) !important;
  box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.08) !important;
}

.footer-nav .nav-link {
  min-height: 50px;
  min-width: 50px;
  color: var(--zh-fog) !important;
}

.footer-nav .nav-link.active,
.footer-nav .nav-link:hover {
  color: var(--zh-ink) !important;
  background: rgba(20, 20, 20, 0.08);
  border-radius: 10px;
}

.cart-fab,
.cart-drawer {
  border-color: var(--zh-hair) !important;
  background: rgba(255, 255, 255, 0.92) !important;
}

#scrollProgressBar {
  background: linear-gradient(90deg, #141414, #555, #b42318) !important;
}

.scroll-up-btn {
  background: rgba(255, 255, 255, 0.94) !important;
  border: 1px solid var(--zh-hair) !important;
}

/* Settings rewire */
.settings-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.settings-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem;
  position: relative;
}

.settings-hero::before,
.panel::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(20, 20, 20, 0.08);
  border-radius: 12px;
  pointer-events: none;
}

.kicker {
  font-family: 'IBM Plex Mono', Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 10px;
  color: rgba(20, 20, 20, 0.7) !important;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  border: 1px solid var(--zh-hair);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  padding: 0.55rem 0.65rem;
}

.avatar {
  width: 62px;
  height: 62px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--zh-hair);
}

.settings-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.nav-wrap {
  position: sticky;
  top: 6rem;
  padding: 0.8rem;
  display: grid;
  gap: 0.45rem;
}

.nav-btn {
  border: 1px solid var(--zh-hair);
  background: rgba(255, 255, 255, 0.86);
  color: var(--zh-ink);
  border-radius: 12px;
  min-height: 46px;
  padding: 0.55rem 0.7rem;
  text-align: left;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'IBM Plex Mono', Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.nav-btn.active,
.nav-btn:hover,
.nav-btn:focus {
  background: var(--zh-ink);
  color: #fff;
  border-color: var(--zh-ink);
}

.panels {
  display: grid;
  gap: 0.95rem;
}

.panel {
  display: none;
  padding: 1.05rem;
  position: relative;
}

.panel.active {
  display: block;
}

.panel h3 {
  margin-bottom: 0.8rem;
  font-size: 1.12rem;
}

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

.wide {
  grid-column: 1 / -1;
}

.toggles {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--zh-hair);
  border-radius: 12px;
  padding: 0.7rem 0.75rem;
  display: grid;
  gap: 0.42rem;
}

.actions {
  margin-top: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.state {
  font-family: 'IBM Plex Mono', Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-height: 1.2rem;
  color: rgba(20, 20, 20, 0.6) !important;
}

.state.ok {
  color: var(--zh-ok) !important;
}

.state.err {
  color: #8e1d15 !important;
}

.state.saving {
  color: #5b5b5b !important;
}

/* Utility */
.ticket-style,
.list-group-item,
.modal-content {
  border-color: var(--zh-hair) !important;
}

/* Product and shop accents */
.fab,
.fab-add,
.fab-export,
.edit-product-btn,
.delete-product-btn,
.floating-filter-btn {
  border-color: var(--zh-hair) !important;
}

.fab {
  background: rgba(255, 255, 255, 0.92) !important;
  color: var(--zh-ink) !important;
}

.fab-add {
  background: var(--zh-ink) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2) !important;
}

.fab-export,
.edit-product-btn {
  background: rgba(255, 255, 255, 0.94) !important;
  color: var(--zh-ink) !important;
}

.delete-product-btn {
  background: rgba(255, 255, 255, 0.94) !important;
  color: var(--zh-danger) !important;
  border-color: rgba(180, 35, 24, 0.3) !important;
}

.delete-product-btn:hover,
.delete-product-btn:focus {
  background: var(--zh-danger-soft) !important;
  color: #8e1d15 !important;
}

.floating-filter-btn {
  background: rgba(255, 255, 255, 0.88) !important;
}

.filter-modal .btn-primary {
  background: var(--zh-ink) !important;
  color: #fff !important;
}

.filter-modal .btn-secondary {
  background: rgba(20, 20, 20, 0.1) !important;
  color: var(--zh-ink) !important;
}

.bulk-action-bar #selectedCount {
  color: var(--zh-ink) !important;
}

.product-card.selected,
.pwa-product-card:hover,
.pwa-product-card:focus {
  border-color: var(--zh-ink) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12) !important;
}

.product-select-checkbox {
  accent-color: var(--zh-ink);
}

/* Role and surface distinction */
body.zh-app.role-admin .zh-shell-header {
  background: linear-gradient(180deg, rgba(248, 245, 244, 0.96) 0%, rgba(248, 245, 244, 0.9) 100%);
}

body.zh-app.role-admin .zh-shell-nav {
  border-color: rgba(180, 35, 24, 0.32) !important;
  box-shadow: 0 16px 34px rgba(70, 14, 10, 0.16) !important;
}

body.zh-app.role-admin .zh-console-left {
  color: #8e1d15;
}

body.zh-app.role-admin .zh-brand img {
  border-color: rgba(180, 35, 24, 0.26);
}

body.zh-app.role-admin .zh-user-chip {
  border-color: rgba(180, 35, 24, 0.24);
}

body.zh-app.role-operator .zh-console-left {
  color: rgba(20, 20, 20, 0.86);
}

body.zh-app.role-guest .zh-console-left {
  color: rgba(20, 20, 20, 0.66);
}

/* Dashboard and chart sections */
body.endpoint-main-dashboard .card.card-glass,
body.endpoint-main-analytics .card.card-glass,
body.endpoint-main-admin_dashboard .card.card-glass-bw,
body.endpoint-main-admin_users .card.card-glass,
body.endpoint-main-admin_sales .card.card-glass {
  border-radius: 16px !important;
  border: 1px solid var(--zh-hair) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08) !important;
}

body.endpoint-main-dashboard .kpi-card,
body.endpoint-main-analytics .highlight-card,
body.endpoint-main-admin_dashboard .glass-metric-card {
  border: 1px solid var(--zh-hair) !important;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.94) 0%, rgba(242, 242, 239, 0.96) 100%) !important;
}

body.endpoint-main-dashboard .kpi-card:hover,
body.endpoint-main-analytics .highlight-card:hover,
body.endpoint-main-admin_dashboard .glass-metric-card.metric-hover:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.12) !important;
}

body.endpoint-main-dashboard canvas,
body.endpoint-main-admin_dashboard canvas {
  width: 100% !important;
  border: 1px solid var(--zh-hair) !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(243, 243, 239, 0.98) 100%) !important;
  padding: 0.35rem !important;
}

body.endpoint-main-dashboard .alert-info,
body.endpoint-main-analytics .alert-info {
  border-radius: 12px !important;
}

body.endpoint-main-analytics .btn-info {
  background: rgba(20, 20, 20, 0.1) !important;
  border: 1px solid var(--zh-hair) !important;
  color: var(--zh-ink) !important;
}

body.endpoint-main-analytics .btn-info:hover,
body.endpoint-main-analytics .btn-info:focus {
  background: rgba(20, 20, 20, 0.18) !important;
  color: var(--zh-ink) !important;
}

body.endpoint-main-analytics .dropdown-menu {
  border: 1px solid var(--zh-hair);
  box-shadow: var(--zh-shadow);
  border-radius: 12px;
}

body.endpoint-main-analytics .dropdown-item:hover {
  background: rgba(20, 20, 20, 0.08) !important;
  color: var(--zh-ink) !important;
}

body.endpoint-main-analytics .card-glass:hover {
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.12) !important;
  transform: translateY(-1px) !important;
}

body.endpoint-main-analytics .btn:hover,
body.endpoint-main-analytics .dropdown-item:hover {
  color: var(--zh-ink) !important;
}

/* Admin layout distinction */
body.endpoint-main-admin_dashboard .admin-layout {
  gap: 1rem;
}

body.endpoint-main-admin_dashboard .admin-sidebar {
  min-height: 80vh;
  border: 1px solid rgba(180, 35, 24, 0.24) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 16px 30px rgba(70, 14, 10, 0.12) !important;
}

body.endpoint-main-admin_dashboard .admin-sidebar .nav-link {
  border: 1px solid transparent;
  border-radius: 10px;
}

body.endpoint-main-admin_dashboard .admin-sidebar .nav-link.active,
body.endpoint-main-admin_dashboard .admin-sidebar .nav-link:focus,
body.endpoint-main-admin_dashboard .admin-sidebar .nav-link:hover {
  border-color: rgba(180, 35, 24, 0.26) !important;
  background: rgba(180, 35, 24, 0.12) !important;
  color: #6f1711 !important;
}

/* POS, shop, sales transaction surfaces */
body.endpoint-main-pos .card-glass,
body.endpoint-main-shop .compact-product-card,
body.endpoint-main-products .pwa-product-card,
body.endpoint-main-sales .timeline-sale,
body.endpoint-main-sales .timeline-sale-detail {
  border: 1px solid var(--zh-hair) !important;
  background: rgba(255, 255, 255, 0.93) !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08) !important;
}

body.endpoint-main-shop .compact-product-card:hover,
body.endpoint-main-products .pwa-product-card:hover,
body.endpoint-main-sales .timeline-sale:hover {
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.12) !important;
}

body.endpoint-main-pos .add-to-cart,
body.endpoint-main-shop .add-to-cart-btn,
body.endpoint-main-sales .timeline-sale-detail .btn {
  min-height: 46px !important;
  border-radius: 12px !important;
  border: 1px solid var(--zh-hair) !important;
}

body.endpoint-main-pos .add-to-cart,
body.endpoint-main-shop .add-to-cart-btn {
  background: var(--zh-ink) !important;
  color: #fff !important;
}

body.endpoint-main-pos .add-to-cart:hover,
body.endpoint-main-shop .add-to-cart-btn:hover {
  background: #000 !important;
  color: #fff !important;
}

body.endpoint-main-sales .timeline-sale-detail {
  border-left: 4px solid rgba(20, 20, 20, 0.32) !important;
  border-top: 1px solid var(--zh-hair) !important;
}

body.endpoint-main-shop .filter-modal-content,
body.endpoint-main-shop .cart-modal-glass,
.cart-drawer {
  border: 1px solid var(--zh-hair) !important;
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18) !important;
}

body.endpoint-main-shop .filter-modal .form-control,
body.endpoint-main-shop .filter-modal .form-select,
body.endpoint-main-shop .filter-modal input[type="number"] {
  min-height: 44px !important;
  border: 1px solid var(--zh-hair) !important;
}

body.endpoint-main-sales .sale-expand {
  border: 1px solid var(--zh-hair) !important;
}

body.endpoint-main-sales .sticky-filter-bar {
  border: 1px solid var(--zh-hair) !important;
  background: rgba(249, 249, 246, 0.98) !important;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 0.55rem;
  border-radius: 14px;
  padding: 0.45rem;
  margin-bottom: 1rem;
}

body.endpoint-main-sales .sticky-filter-bar .btn {
  min-height: 44px;
  min-width: 44px;
  border: 1px solid var(--zh-hair);
  background: rgba(255, 255, 255, 0.9) !important;
  color: var(--zh-ink) !important;
}

body.endpoint-main-sales .sticky-filter-bar .btn:focus,
body.endpoint-main-sales .sticky-filter-bar .btn:hover {
  background: var(--zh-ink) !important;
  color: #fff !important;
}

/* Settings/forms/tables */
body.endpoint-main-settings .settings-shell .panel,
body.endpoint-main-settings .settings-shell .nav-wrap,
body.endpoint-main-settings .settings-shell .settings-hero {
  border: 1px solid var(--zh-hair) !important;
}

body.endpoint-main-settings .form-label {
  font-family: 'IBM Plex Mono', Consolas, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(20, 20, 20, 0.72);
}

body.endpoint-main-settings .panel .form-control,
body.endpoint-main-settings .panel .form-select {
  border-radius: 10px !important;
}

body.endpoint-main-settings .form-check-label {
  color: var(--zh-ink);
}

body.endpoint-main-settings .actions .btn {
  min-height: 46px;
}

.table-responsive {
  border: 1px solid var(--zh-hair);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
}

.table tbody td {
  vertical-align: middle;
}

/* Floating buttons */
.cart-fab,
.floating-filter-btn,
.fab,
.scroll-to-top,
#scrollUpBtn {
  border: 1px solid var(--zh-hair) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16) !important;
}

.cart-fab {
  min-height: 56px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  color: var(--zh-ink) !important;
}

.cart-fab .cart-fab-count {
  background: var(--zh-danger) !important;
  color: #fff !important;
}

.floating-filter-btn,
.fab,
.scroll-to-top,
#scrollUpBtn {
  min-width: 52px !important;
  min-height: 52px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  color: var(--zh-ink) !important;
}

.floating-filter-btn:hover,
.fab:hover,
.scroll-to-top:hover,
#scrollUpBtn:hover {
  background: var(--zh-ink) !important;
  color: #fff !important;
}

/* Popup system */
.modal-content {
  border: 1px solid var(--zh-hair) !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18) !important;
}

.modal-header,
.modal-footer {
  border-color: var(--zh-hair) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(245, 245, 241, 0.9) 100%);
}

.modal-title {
  font-family: 'IBM Plex Mono', Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  color: rgba(20, 20, 20, 0.88);
}

.modal-body {
  color: var(--zh-ink);
}

.modal .btn-close {
  border: 1px solid var(--zh-hair);
  border-radius: 999px;
  box-shadow: none;
}

.zh-popup-stack {
  position: fixed;
  top: 86px;
  right: 16px;
  z-index: 2100;
  display: grid;
  gap: 0.55rem;
  width: min(350px, calc(100vw - 24px));
}

.zh-toast {
  border: 1px solid var(--zh-hair);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.18);
  color: var(--zh-ink);
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.58rem 0.7rem;
  transform: translateY(-8px);
  opacity: 0;
  transition: opacity 140ms ease, transform 140ms ease;
}

.zh-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.zh-toast .zh-toast-text {
  font-size: 0.9rem;
  line-height: 1.35;
}

.zh-toast .zh-toast-close {
  width: 28px;
  height: 28px;
  border: 1px solid var(--zh-hair);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--zh-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.zh-toast .zh-toast-close:hover,
.zh-toast .zh-toast-close:focus {
  background: rgba(20, 20, 20, 0.1);
}

.zh-toast-success {
  border-color: rgba(47, 111, 68, 0.3);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.96) 0%, rgba(240, 247, 243, 0.96) 100%);
}

.zh-toast-warning {
  border-color: rgba(138, 109, 31, 0.34);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.96) 0%, rgba(250, 247, 236, 0.96) 100%);
}

.zh-toast-danger {
  border-color: rgba(180, 35, 24, 0.36);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.96) 0%, rgba(254, 243, 242, 0.96) 100%);
}

.zh-toast-info {
  border-color: var(--zh-hair);
}

#zhConfirmModal .modal-body p,
#zhPromptModal .modal-body label {
  margin-bottom: 0;
}

#zhPromptModal .form-control {
  margin-top: 0.55rem;
}

.toast {
  border: 1px solid var(--zh-hair) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.95) !important;
  color: var(--zh-ink) !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.14) !important;
}

.toast .toast-body {
  color: var(--zh-ink) !important;
}

.toast .btn-close {
  filter: none;
}

.mini-modal {
  position: fixed;
  inset: 0;
  z-index: 2050;
  display: grid;
  place-items: center;
  background: rgba(20, 20, 20, 0.38);
  backdrop-filter: blur(2px);
}

.mini-modal-content {
  width: min(520px, calc(100vw - 24px));
  border: 1px solid var(--zh-hair);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.2);
  padding: 1rem;
}

.mini-modal-actions .btn {
  min-width: 110px;
}

.filter-modal-content,
.cart-modal-glass {
  border: 1px solid var(--zh-hair) !important;
  border-radius: 16px !important;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18) !important;
  background: rgba(255, 255, 255, 0.95) !important;
}

.filter-modal-overlay {
  background: rgba(20, 20, 20, 0.38) !important;
}

/* Landing and auth pages */
body.endpoint-main-landing .zh-main-content,
body.endpoint-main-login .zh-main-content,
body.endpoint-main-register .zh-main-content {
  max-width: 1240px;
}

.zh-landing-shell {
  display: grid;
  gap: 1rem;
  margin-top: 0.15rem;
}

.zh-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.95fr);
  gap: 1rem;
}

.zh-hero-panel,
.zh-hero-system,
.zh-feature-card,
.zh-workflow-panel,
.zh-workflow-media,
.zh-pricing-card,
.zh-support-strip,
.zh-auth-side,
.zh-auth-card {
  position: relative;
  overflow: hidden;
}

.zh-hero-panel,
.zh-hero-system,
.zh-feature-card,
.zh-workflow-panel,
.zh-workflow-media,
.zh-pricing-card,
.zh-support-strip,
.zh-auth-side,
.zh-auth-card {
  padding: 1.2rem;
}

.zh-hero-panel::before,
.zh-hero-system::before,
.zh-auth-side::before,
.zh-auth-card::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(20, 20, 20, 0.07);
  border-radius: 12px;
  pointer-events: none;
}

.zh-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.zh-hero-cta .btn {
  min-width: 180px;
}

.zh-hero-metrics {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.zh-metric-chip {
  border: 1px solid var(--zh-hair);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  padding: 0.65rem 0.75rem;
  display: grid;
  gap: 0.35rem;
}

.zh-metric-chip .label {
  font-family: 'IBM Plex Mono', Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 10px;
  color: rgba(20, 20, 20, 0.65);
}

.zh-metric-chip strong {
  font-size: 0.92rem;
  color: var(--zh-ink);
}

.zh-system-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.zh-system-list li {
  border: 1px solid var(--zh-hair);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.87);
  padding: 0.65rem 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.zh-system-list li i {
  margin-top: 0.1rem;
  color: var(--zh-ink);
}

.zh-system-footer {
  margin-top: 0.8rem;
  padding: 0.65rem 0.75rem;
  border: 1px dashed rgba(20, 20, 20, 0.26);
  border-radius: 12px;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
}

.zh-system-footer i {
  color: var(--zh-danger);
}

.zh-landing-section {
  display: grid;
  gap: 0.9rem;
}

.zh-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  gap: 0.8rem;
  align-items: end;
}

.zh-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.zh-feature-card {
  border: 1px solid var(--zh-hair);
  border-radius: 16px;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.95) 0%, rgba(242, 242, 239, 0.98) 100%);
  min-height: 190px;
  display: grid;
  align-content: start;
  gap: 0.5rem;
  transition: transform 170ms ease, box-shadow 170ms ease;
}

.zh-feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.12);
}

.zh-feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--zh-hair);
  background: rgba(255, 255, 255, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.zh-feature-card h3 {
  font-size: 1rem;
  margin: 0;
}

.zh-feature-card p {
  margin: 0;
  font-size: 0.92rem;
}

.zh-workflow-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1rem;
}

.zh-workflow-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.72rem;
}

.zh-workflow-list li {
  border: 1px solid var(--zh-hair);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.68rem 0.78rem;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 0.62rem;
}

.zh-workflow-list li span {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--zh-hair);
  background: rgba(20, 20, 20, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', Consolas, monospace;
  font-size: 12px;
}

.zh-workflow-list h3 {
  font-size: 0.96rem;
  margin: 0 0 0.2rem;
}

.zh-workflow-list p {
  margin: 0;
  font-size: 0.9rem;
}

.zh-workflow-media {
  display: grid;
  gap: 0.72rem;
}

.zh-workflow-media img {
  border-radius: 14px;
  border: 1px solid var(--zh-hair);
  background: rgba(255, 255, 255, 0.86);
  max-height: 320px;
  width: 100%;
  object-fit: contain;
  padding: 0.8rem;
}

.zh-workflow-note {
  border: 1px solid var(--zh-hair);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  padding: 0.7rem 0.75rem;
  font-size: 0.9rem;
}

.zh-pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.zh-pricing-card {
  border: 1px solid var(--zh-hair);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  gap: 0.7rem;
}

.zh-pricing-card.recommended {
  border-color: rgba(180, 35, 24, 0.33);
  box-shadow: 0 16px 30px rgba(70, 14, 10, 0.14);
}

.zh-pricing-tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--zh-danger);
  color: #fff;
  font-family: 'IBM Plex Mono', Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10px;
  padding: 0.3rem 0.48rem;
  border-radius: 999px;
}

.zh-pricing-head h3 {
  margin: 0 0 0.2rem;
}

.zh-pricing-head p {
  margin: 0;
  font-size: 0.92rem;
}

.zh-price {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
  color: var(--zh-ink);
  font-weight: 680;
}

.zh-price small {
  font-size: 0.8rem;
  color: rgba(20, 20, 20, 0.62);
  font-weight: 500;
}

.zh-pricing-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.zh-pricing-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.zh-pricing-list li i {
  color: var(--zh-ok);
  margin-top: 0.2rem;
}

.zh-support-strip {
  border: 1px solid var(--zh-hair);
  border-radius: 16px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.95) 0%, rgba(238, 237, 232, 0.98) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.zh-support-strip p {
  color: var(--zh-ink) !important;
  font-size: 0.95rem;
}

.zh-auth-shell {
  margin: 1rem auto 0;
  max-width: 1040px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.zh-auth-side {
  border: 1px solid var(--zh-hair);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  display: grid;
  gap: 0.9rem;
  align-content: start;
}

.zh-auth-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.68rem;
}

.zh-auth-bullets li {
  border: 1px solid var(--zh-hair);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  padding: 0.65rem 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.48rem;
}

.zh-auth-bullets li i {
  color: var(--zh-ink);
  margin-top: 0.1rem;
}

.zh-auth-footnote {
  font-size: 0.9rem;
}

.zh-auth-footnote a {
  color: var(--zh-ink);
  font-weight: 600;
}

.zh-auth-card {
  border-radius: 18px !important;
  border: 1px solid var(--zh-hair) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  display: grid;
  gap: 0.9rem;
  align-content: start;
}

.zh-auth-card-head i {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--zh-hair);
  background: rgba(20, 20, 20, 0.08);
  color: var(--zh-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
}

.zh-auth-card-head p {
  font-size: 0.9rem;
}

.zh-auth-card .form-floating > label {
  color: rgba(20, 20, 20, 0.66) !important;
}

.zh-auth-card .form-control,
.zh-auth-card .form-select {
  border-radius: 11px !important;
  background: rgba(255, 255, 255, 0.95) !important;
}

.zh-auth-card .btn {
  min-height: 48px;
}

.zh-auth-helper {
  font-size: 0.82rem;
  color: rgba(20, 20, 20, 0.62) !important;
}

.zh-password-wrap {
  position: relative;
}

.zh-password-wrap .form-control {
  padding-right: 2.8rem;
}

.zh-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.7rem;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  width: 2rem;
  height: 2rem;
  color: rgba(20, 20, 20, 0.58);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.zh-password-toggle:hover,
.zh-password-toggle:focus {
  color: var(--zh-ink);
  background: rgba(20, 20, 20, 0.08);
}

/* Dashboard templates */
.zh-dashboard-shell {
  display: grid;
  gap: 0.9rem;
}

.zh-dashboard-profile,
.zh-dashboard-banner,
.zh-chart-card,
.zh-activity-card {
  border: 1px solid var(--zh-hair) !important;
}

.zh-profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--zh-hair);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.zh-dashboard-banner {
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 245, 241, 0.95) 100%) !important;
}

.zh-kpi-grid .kpi-card .card-body {
  display: grid;
  gap: 0.35rem;
}

.zh-kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--zh-hair);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--zh-ink);
}

.zh-activity-list .list-group-item {
  border-color: var(--zh-hair) !important;
  background: rgba(255, 255, 255, 0.52);
}

/* Sales templates */
.zh-sales-shell {
  max-width: 760px;
}

.zh-sales-head {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 0.72rem 0.3rem;
  background: linear-gradient(180deg, rgba(247, 247, 244, 0.98) 0%, rgba(247, 247, 244, 0.9) 100%);
}

.sales-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.timeline-dot-chain {
  display: none;
}

.timeline-sale {
  position: relative;
  border-radius: 1rem;
  padding: 1rem;
  border-left: 5px solid rgba(20, 20, 20, 0.22);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: box-shadow 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.timeline-sale:hover,
.timeline-sale.active {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.12);
  border-left-color: rgba(20, 20, 20, 0.46);
}

.timeline-sale-usd {
  border-left-color: #1d1d1d;
}

.timeline-sale-zar {
  border-left-color: #5a5a5a;
}

.timeline-sale-zig {
  border-left-color: #8d8d8d;
}

.timeline-dot {
  position: absolute;
  left: 1rem;
  top: -0.62rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  border: 2px solid #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #1a1a1a;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.timeline-dot-zar {
  background: #5a5a5a;
}

.timeline-dot-zig {
  background: #8d8d8d;
  color: #111;
}

.timeline-sale .sale-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.timeline-sale .sale-date {
  color: rgba(20, 20, 20, 0.85);
  font-weight: 600;
  font-size: 0.95rem;
}

.timeline-sale .sale-total {
  font-family: 'Fira Mono', Consolas, monospace;
  font-weight: 700;
}

.timeline-sale .sale-currency {
  border-radius: 999px;
  padding: 0.14rem 0.62rem;
  font-size: 0.8rem;
  color: #fff;
  background: #1f1f1f;
}

.timeline-sale .sale-currency.zar {
  background: #4f4f4f;
}

.timeline-sale .sale-currency.zig {
  background: #8d8d8d;
  color: #171717;
}

.timeline-sale .sale-expand {
  margin-left: auto;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid var(--zh-hair);
  background: rgba(255, 255, 255, 0.88);
  color: var(--zh-ink);
}

.timeline-sale.active .sale-expand {
  background: var(--zh-ink);
  color: #fff;
}

.timeline-sale .event-watermark {
  position: absolute;
  right: 0.85rem;
  bottom: 0.6rem;
  font-size: 2.4rem;
  color: rgba(20, 20, 20, 0.07);
}

.timeline-sale-detail {
  margin-top: 0.82rem;
  padding: 0.82rem;
  border-radius: 0.9rem;
  border-left: 4px solid rgba(20, 20, 20, 0.28);
  border-top: 1px solid var(--zh-hair);
  background: rgba(246, 246, 242, 0.94);
}

.timeline-sale-detail .meta-row {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  margin-bottom: 0.35rem;
}

.timeline-sale-detail .item-list {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.25rem 0.6rem;
}

.timeline-sale-detail .item-list-header {
  font-weight: 700;
  margin-bottom: 0.28rem;
}

.zh-item-list-header {
  margin-bottom: 0.2rem;
}

.timeline-shimmer {
  height: 120px;
  border-radius: 1rem;
  background: linear-gradient(90deg, #f2f2ef 25%, #e4e4df 50%, #f2f2ef 75%);
  background-size: 200% 100%;
  animation: zh-shimmer 1.15s linear infinite;
}

@keyframes zh-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.scroll-to-top {
  position: fixed;
  right: 1rem;
  bottom: calc(4.4rem + 1rem);
  z-index: 1200;
  width: 3rem;
  height: 3rem;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--zh-hair);
  background: rgba(255, 255, 255, 0.94);
  color: var(--zh-ink);
  overflow: hidden;
}

.scroll-to-top .ripple {
  position: absolute;
  border-radius: 999px;
  transform: scale(0);
  animation: zh-ripple 0.6s linear;
  background: rgba(20, 20, 20, 0.17);
  width: 40px;
  height: 40px;
}

@keyframes zh-ripple {
  to {
    transform: scale(2.2);
    opacity: 0;
  }
}

.zh-sale-detail-shell {
  padding-bottom: 4rem;
}

.zh-sale-receipt-card {
  max-width: 440px;
  border: 2px dashed rgba(20, 20, 20, 0.34);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.zh-sale-line-total {
  font-size: 0.98em;
}

/* Analytics template */
.zh-analytics-shell {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  gap: 0.95rem;
  padding-bottom: 3.5rem;
}

.zh-analytics-header {
  position: sticky;
  top: 0;
  z-index: 70;
  background: linear-gradient(180deg, rgba(247, 247, 244, 0.98) 0%, rgba(247, 247, 244, 0.9) 100%) !important;
  backdrop-filter: blur(6px);
}

.zh-analytics-controls .btn,
.zh-analytics-controls .dropdown-toggle {
  min-height: 44px;
}

.zh-analytics-kpis .card {
  min-height: 132px;
}

.zh-analytics-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.45);
}

.zh-analytics-currency-note {
  border-radius: 0.7rem;
}

.zh-analytics-mini-stats > div > div {
  border: 1px solid var(--zh-hair);
  border-radius: 10px;
  padding: 0.52rem;
  background: rgba(255, 255, 255, 0.86);
}

.zh-analytics-table-wrap {
  max-height: 300px;
  overflow: auto;
}

.zh-analytics-table-wrap-small {
  max-height: 210px;
  overflow: auto;
}

.zh-analytics-chart-wrap {
  position: relative;
  height: 260px;
}

.zh-analytics-chart-wrap-lg {
  height: 320px;
}

.zh-analytics-canvas {
  height: 100% !important;
  width: 100% !important;
  display: block;
}

.zh-cluster-narrative {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.6rem;
}

.zh-cluster-card {
  border: 1px solid var(--zh-hair);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.65rem 0.75rem;
}

.zh-cluster-card .kicker {
  font-size: 9px;
  letter-spacing: 0.12em;
}

.zh-cluster-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--zh-hair);
  font-family: 'IBM Plex Mono', Consolas, monospace;
  font-size: 10px;
}

.zh-cluster-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--cluster-color, #141414);
}

body.endpoint-main-analytics canvas {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 0 !important;
}

body.endpoint-main-analytics .highlight-card {
  min-height: 190px;
}

@media (max-width: 991.98px) {
  .zh-analytics-header {
    position: static;
  }

  .zh-analytics-chart-wrap {
    height: 230px;
  }

  .zh-analytics-chart-wrap-lg {
    height: 280px;
  }
}

#advancedInsightsList .list-group-item {
  border-color: var(--zh-hair);
  background: transparent;
}

/* Admin dashboard template cleanup */
body.endpoint-main-admin_dashboard .admin-layout,
body.endpoint-main-admin_audit_logs .admin-layout,
body.endpoint-main-admin_users .admin-layout,
body.endpoint-main-admin_messages .admin-layout {
  min-height: 80vh;
  gap: 1rem;
}

body.endpoint-main-admin_dashboard .admin-sidebar,
body.endpoint-main-admin_audit_logs .admin-sidebar,
body.endpoint-main-admin_users .admin-sidebar,
body.endpoint-main-admin_messages .admin-sidebar {
  min-height: 80vh;
}

body.endpoint-main-admin_dashboard .admin-sidebar .nav-link,
body.endpoint-main-admin_audit_logs .admin-sidebar .nav-link,
body.endpoint-main-admin_users .admin-sidebar .nav-link,
body.endpoint-main-admin_messages .admin-sidebar .nav-link {
  color: #212529;
  border-radius: 0.8rem;
  transition: background 140ms ease, color 140ms ease;
}

body.endpoint-main-admin_dashboard .admin-sidebar .nav-link.active,
body.endpoint-main-admin_dashboard .admin-sidebar .nav-link:focus,
body.endpoint-main-admin_dashboard .admin-sidebar .nav-link:hover,
body.endpoint-main-admin_audit_logs .admin-sidebar .nav-link.active,
body.endpoint-main-admin_audit_logs .admin-sidebar .nav-link:focus,
body.endpoint-main-admin_audit_logs .admin-sidebar .nav-link:hover,
body.endpoint-main-admin_users .admin-sidebar .nav-link.active,
body.endpoint-main-admin_users .admin-sidebar .nav-link:focus,
body.endpoint-main-admin_users .admin-sidebar .nav-link:hover,
body.endpoint-main-admin_messages .admin-sidebar .nav-link.active,
body.endpoint-main-admin_messages .admin-sidebar .nav-link:focus,
body.endpoint-main-admin_messages .admin-sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #141414;
}

.glass-metric-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, rgba(240, 248, 255, 0.32) 100%);
  border-radius: 1.2rem;
  box-shadow: 0 4px 24px rgba(34, 34, 34, 0.13), 0 1.5px 8px rgba(20, 20, 20, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.glass-metric-card.metric-hover:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 32px rgba(20, 20, 20, 0.16), 0 2px 12px rgba(20, 20, 20, 0.08);
}

.device-table th,
.device-table td,
.audit-logs-table th,
.audit-logs-table td,
.messages-table th,
.messages-table td {
  vertical-align: middle;
}

.device-row-hover:hover,
.audit-logs-table tr:hover,
.messages-table tr:hover {
  background: rgba(20, 20, 20, 0.07) !important;
}

.mini-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  object-fit: cover;
  border: 1.5px solid #e3e3e3;
}

.chart-legend {
  font-size: 0.95em;
  color: #555;
}

.zh-admin-legend-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  margin-right: 0.3rem;
  margin-bottom: 0.25rem;
  padding: 0.3em 0.7em;
  border-radius: 0.5rem;
  border: 1px solid var(--zh-hair);
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.94);
  color: #1f1f1f;
}

.zh-admin-legend-dot {
  color: var(--legend-color, #141414);
}

.glass-filter-bar {
  margin-bottom: 1.5rem;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
}

.audit-logs-table .badge,
.messages-table .badge {
  font-size: 1em;
  padding: 0.5em 1em;
  border-radius: 1em;
  box-shadow: 0 1px 4px rgba(34, 34, 34, 0.08);
}

.message-preview {
  cursor: pointer;
}

.message-preview.expanded {
  font-weight: 500;
}

.zh-admin-toast-wrap .toast {
  min-width: 220px;
}

@media (max-width: 1100px) {
  .zh-console-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 0.4rem;
  }

  .zh-console-center {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

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

  .nav-wrap {
    position: static;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    overflow-x: auto;
  }

  .zh-nav-label {
    display: none;
  }

  .zh-hero-grid,
  .zh-workflow-grid,
  .zh-section-head,
  .zh-auth-shell {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .zh-shell-nav {
    width: calc(100% - 0.8rem);
    border-radius: 14px;
  }

  .zh-brand span {
    display: none;
  }

  .zh-user-chip {
    padding: 0.3rem;
  }

  .settings-hero {
    grid-template-columns: 1fr;
  }

  .fgrid {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .actions .btn {
    width: 100%;
  }

  .zh-hero-metrics {
    grid-template-columns: 1fr;
  }

  .zh-pricing-grid {
    grid-template-columns: 1fr;
  }

  .zh-support-strip {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 576px) {
  .floating-filter-btn,
  .fab,
  .scroll-to-top,
  #scrollUpBtn {
    min-width: 46px !important;
    min-height: 46px !important;
  }

  .cart-fab {
    min-height: 48px !important;
  }

  .zh-console-right {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .zh-nav {
    gap: 0.3rem;
  }

  .zh-nav-link {
    padding: 0.45rem !important;
  }

  .nav-wrap {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .zh-feature-grid {
    grid-template-columns: 1fr;
  }

  .zh-hero-cta .btn {
    width: 100%;
    min-width: 0;
  }

  .zh-popup-stack {
    top: 74px;
    right: 10px;
    width: calc(100vw - 20px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
