.ap-page-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  min-height: 136px;
  border-radius: 22px;
  padding: 24px 28px;
  color: #FFFFFF;
  background: linear-gradient(135deg, #6F43C4 0%, #9B6DEB 100%);
  box-shadow: 0 14px 34px rgba(75, 46, 131, 0.12);
}

.ap-page-hero::after {
  position: absolute;
  right: -80px;
  bottom: -100px;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0));
  content: "";
}

.ap-page-hero p,
.ap-page-hero h1,
.ap-page-hero span {
  position: relative;
  z-index: 1;
}

.ap-page-hero > div {
  min-width: 0;
}

.ap-page-hero p {
  margin: 0 0 7px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ap-page-hero h1 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 36px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
}

.ap-page-hero div > span {
  display: block;
  max-width: 720px;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.ap-page-hero-icon {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 22px;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 34px;
}

.ap-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

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

.ap-metric-pill,
.ap-panel {
  border: 1px solid #EFE9FB;
  border-radius: 18px;
  background: var(--ap-surface);
  box-shadow: var(--ap-shadow-soft);
}

.ap-metric-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 15px 16px;
}

.ap-metric-pill > .material-symbols-rounded {
  display: grid;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  color: var(--ap-purple-700);
  background: var(--ap-purple-100);
}

.ap-metric-pill p {
  margin: 0 0 4px;
  color: var(--ap-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ap-metric-pill strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
}

.ap-panel {
  margin-top: 16px;
  padding: 20px 22px;
}

.ap-work-card {
  min-width: 0;
}

.ap-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ap-panel-header > .material-symbols-rounded {
  color: var(--ap-purple-700);
  font-size: 26px;
}

.ap-panel-header h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0;
}

.ap-panel-header p {
  margin: 0;
  color: var(--ap-muted);
  font-size: 13px;
  font-weight: 450;
}

.ap-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.ap-pdv-workbench {
  align-items: start;
}

.ap-pdv-workbench > .ap-work-card:last-child {
  border-left: 1px solid #EFE9FB;
  padding-left: 16px;
}

.ap-pdv-workbench > :last-child {
  position: sticky;
  top: 18px;
}

.ap-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin-top: 18px;
}

.ap-form-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.ap-form-layout > div:first-child {
  max-width: 760px;
  border: 0;
  border-bottom: 1px solid #EFE9FB;
  border-radius: 0;
  padding: 0 0 13px;
  background: transparent;
}

.ap-form-layout h3,
.ap-section-heading h3 {
  margin: 0 0 5px;
  color: var(--ap-ink);
  font-size: 17px;
  font-weight: 650;
}

.ap-form-layout p,
.ap-section-heading p {
  margin: 0;
  color: var(--ap-muted);
  font-size: 13px;
  font-weight: 450;
}

.ap-form-narrow {
  max-width: 980px;
  margin-top: 0;
}

.ap-section-heading {
  margin-bottom: 10px;
}

.ap-form-compact {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  min-width: min(560px, calc(100vw - 80px));
  margin-top: 12px;
}

.ap-form label,
.ap-search-row {
  display: grid;
  gap: 7px;
}

.ap-form label > span {
  color: var(--ap-muted);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.ap-field-wide,
.ap-form .ap-check,
.ap-form button {
  grid-column: 1 / -1;
}

.ap-form input,
.ap-form select,
.ap-form textarea,
.ap-search-row input,
.ap-search-row select {
  width: 100%;
  border: 1px solid var(--ap-border);
  border-radius: 14px;
  min-height: 43px;
  padding: 10px 14px;
  color: var(--ap-ink);
  background: #FFFFFF;
  box-shadow: 0 6px 16px rgba(75, 46, 131, 0.035);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.ap-form textarea {
  border-radius: 12px;
  min-height: 92px;
  resize: vertical;
}

.ap-form select,
.ap-search-row select {
  appearance: none;
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ap-purple-700) 50%),
    linear-gradient(135deg, var(--ap-purple-700) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 19px,
    calc(100% - 14px) 19px;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px;
  cursor: pointer;
}

.ap-form select[multiple],
.ap-search-row select[multiple] {
  border-radius: 16px;
  min-height: 74px;
  padding-right: 14px;
  background-image: none;
  cursor: default;
}

.ap-form input:focus,
.ap-form select:focus,
.ap-form textarea:focus,
.ap-search-row input:focus,
.ap-search-row select:focus {
  border-color: var(--ap-purple-500);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(169, 124, 242, 0.18), 0 10px 24px rgba(75, 46, 131, 0.07);
}

.ap-form input::placeholder,
.ap-form textarea::placeholder,
.ap-search-row input::placeholder {
  color: #9B94B8;
  font-weight: 450;
}

.ap-check {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px !important;
}

.ap-check input {
  width: auto;
  min-height: auto;
  box-shadow: none;
}

.ap-button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  color: #FFFFFF;
  background: linear-gradient(135deg, #7B4DCC, #A97CF2);
  box-shadow: 0 10px 24px rgba(123, 77, 204, 0.20);
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
}

.ap-button-primary:hover {
  background: linear-gradient(135deg, #6F3FBD, #9567E6);
}

.ap-button-primary:disabled,
.ap-button-secondary:disabled,
.ap-button-danger:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  box-shadow: none;
}

.ap-button-primary.is-loading,
.ap-button-secondary.is-loading,
.ap-button-danger.is-loading {
  cursor: progress;
}

.ap-button-primary.is-loading > .material-symbols-rounded:first-child,
.ap-button-secondary.is-loading > .material-symbols-rounded:first-child,
.ap-button-danger.is-loading > .material-symbols-rounded:first-child {
  display: none;
}

.ap-button-primary.is-loading::before,
.ap-button-secondary.is-loading::before,
.ap-button-danger.is-loading::before {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: ap-spin 0.72s linear infinite;
}

@keyframes ap-spin {
  to {
    transform: rotate(360deg);
  }
}

.ap-button-secondary,
.ap-button-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 41px;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
}

.ap-button-secondary {
  border: 1px solid var(--ap-border);
  color: var(--ap-purple-700);
  background: #FFFFFF;
  text-decoration: none;
}

.ap-button-danger {
  margin-top: 10px;
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #B91C1C;
  background: #FEF2F2;
}

.ap-search-row {
  align-items: end;
  margin: 16px 0 12px;
}

.ap-tabs {
  margin-top: 16px;
}

.ap-tabs-compact {
  margin-top: 0;
}

.ap-tab-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  border: 1px solid #EFE9FB;
  border-radius: 16px;
  margin-bottom: 16px;
  padding: 6px;
  background: #FBFAFF;
}

.ap-tab-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 0;
  flex: 0 0 auto;
  border-radius: 10px;
  padding: 9px 14px;
  color: var(--ap-muted);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.ap-tab-button .material-symbols-rounded {
  color: var(--ap-purple-700);
  font-size: 20px;
}

.ap-tab-button::after {
  content: none;
}

.ap-tab-button.is-active {
  color: var(--ap-purple-900);
  background: #F0EAFD;
  box-shadow: 0 8px 18px rgba(75, 46, 131, 0.06);
}

.ap-tab-panel[hidden] {
  display: none !important;
}

.ap-tab-panel > *:first-child {
  margin-top: 0;
}

.ap-result-panel {
  display: grid;
  gap: 14px;
}

.ap-search-grid {
  grid-template-columns: minmax(0, 1fr) 220px;
}

.ap-search-grid-4 {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.ap-filter-status {
  display: grid;
  gap: 7px;
  min-height: 44px;
  border: 1px solid var(--ap-border);
  border-radius: 12px;
  margin: 0;
  padding: 7px 10px 10px;
  background: #FFFFFF;
  box-shadow: 0 7px 18px rgba(75, 46, 131, 0.04);
}

.ap-filter-status legend {
  padding: 0 4px;
  color: var(--ap-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.ap-check-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ap-check-chip {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  cursor: pointer;
}

.ap-check-chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.ap-check-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid #EFE9FB;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--ap-muted);
  background: #FBFAFF;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.ap-check-chip input:checked + span {
  border-color: rgba(123, 77, 204, 0.3);
  color: var(--ap-purple-900);
  background: var(--ap-purple-100);
}

.ap-check-chip input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(169, 124, 242, 0.18);
}

.ap-form-single {
  grid-template-columns: 1fr;
}

.ap-field-highlight {
  grid-column: 1 / -1;
  border: 1px solid #E7DDFC;
  border-radius: 16px;
  padding: 14px;
  background: #FBFAFF;
}

.ap-field-highlight input {
  border-color: rgba(123, 77, 204, 0.26);
  min-height: 48px;
  font-size: 15px;
}

.ap-details-panel {
  grid-column: 1 / -1;
  border: 1px solid #EFE9FB;
  border-radius: 16px;
  background: #FBFAFF;
}

.ap-details-panel summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  color: var(--ap-purple-900);
  cursor: pointer;
  font-weight: 650;
}

.ap-details-panel summary::marker {
  color: var(--ap-purple-700);
}

.ap-details-panel .ap-form {
  margin: 0;
  padding: 0 14px 14px;
}

.ap-import-box {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.ap-import-result {
  overflow-x: auto;
  min-height: 44px;
  border: 1px solid var(--ap-border);
  border-radius: 14px;
  margin: 0;
  padding: 12px;
  color: var(--ap-muted);
  background: #FFFFFF;
  white-space: pre-wrap;
}

.ap-pdv-message:empty {
  display: none;
}

body.is-modal-open {
  overflow: hidden;
}

.ap-close-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.ap-close-header .ap-section-heading {
  margin-bottom: 0;
}

.ap-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(23, 17, 58, 0.34);
  backdrop-filter: blur(8px);
}

.ap-modal[hidden] {
  display: none;
}

.ap-modal-card {
  overflow: auto;
  width: min(680px, 100%);
  max-height: calc(100dvh - 48px);
  border: 1px solid #EFE9FB;
  border-radius: 22px;
  background: #FFFFFF;
  box-shadow: 0 28px 80px rgba(75, 46, 131, 0.22);
}

.ap-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #EFE9FB;
  padding: 18px 20px;
  background: linear-gradient(180deg, #FBFAFF 0%, #FFFFFF 100%);
}

.ap-modal-header > div > span {
  color: var(--ap-muted);
  font-size: 12px;
  font-weight: 650;
}

.ap-modal-header .ap-icon-button .material-symbols-rounded {
  color: var(--ap-purple-700);
  font-size: 20px;
  font-weight: 400;
}

.ap-modal-header h3 {
  margin: 2px 0 0;
  color: var(--ap-ink);
  font-size: 20px;
  font-weight: 700;
}

.ap-modal-body {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.ap-payment-review {
  display: grid;
  gap: 10px;
}

.ap-close-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ap-close-totals article {
  border: 1px solid #EFE9FB;
  border-radius: 14px;
  padding: 12px;
  background: #FBFAFF;
}

.ap-close-totals span {
  display: block;
  color: var(--ap-muted);
  font-size: 12px;
  font-weight: 600;
}

.ap-close-totals strong {
  display: block;
  margin-top: 4px;
  color: var(--ap-ink);
  font-size: 17px;
  font-weight: 750;
}

.ap-close-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #EFE9FB;
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--ap-muted);
  background: #FBFAFF;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.ap-close-note .material-symbols-rounded {
  color: var(--ap-purple-700);
  font-size: 19px;
}

.ap-close-note p {
  margin: 0;
}

.ap-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #EFE9FB;
  padding: 16px 20px;
}

.ap-form-actions {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-inline: 0;
  padding-bottom: 0;
}

.ap-product-edit-modal {
  width: min(760px, 100%);
}

.ap-confirm-card {
  width: min(440px, 100%);
}

.ap-confirm-card .ap-modal-body {
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.ap-confirm-card .ap-modal-body p {
  max-width: 340px;
  margin: 0;
  color: var(--ap-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.ap-confirm-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  color: #B91C1C;
  background: #FEF2F2;
}

.ap-confirm-icon .material-symbols-rounded {
  font-size: 28px;
}

.ap-empty-state-compact {
  min-height: auto;
  padding: 18px;
}

.ap-cart-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.ap-cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 40px;
  align-items: center;
  gap: 10px;
  border: 1px solid #EFE9FB;
  border-radius: 12px;
  padding: 12px;
  background: #FFFFFF;
}

.ap-cart-line strong {
  display: block;
  color: var(--ap-ink);
  font-size: 14px;
}

.ap-cart-line small {
  display: block;
  margin-top: 3px;
  color: var(--ap-muted);
  font-weight: 700;
}

.ap-cart-line span {
  display: block;
  margin-top: 4px;
  color: var(--ap-muted);
  font-size: 12px;
  font-weight: 600;
}

.ap-cart-line input {
  width: 100%;
  border: 1px solid var(--ap-border);
  border-radius: 999px;
  min-height: 40px;
  padding: 9px 10px;
  color: var(--ap-ink);
  background: #FFFFFF;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
  outline: none;
}

.ap-cart-line input:focus {
  border-color: var(--ap-purple-500);
  box-shadow: 0 0 0 3px rgba(169, 124, 242, 0.18);
}

.ap-cart-line button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 10px;
  color: #B91C1C;
  background: #FEF2F2;
  cursor: pointer;
}

.ap-cart-total {
  display: grid;
  gap: 8px;
  border-top: 1px solid #EFE9FB;
  margin-top: 18px;
  padding-top: 18px;
}

.ap-cart-total div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ap-muted);
  font-weight: 650;
}

.ap-cart-total strong {
  color: var(--ap-ink);
  font-size: 22px;
}

.ap-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.ap-queue-card .ap-actions-row {
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 14px;
}

.ap-queue-card .ap-row-details {
  margin-top: 14px;
}

.ap-queue-card .ap-row-details summary {
  width: 100%;
  justify-content: center;
}

.ap-toast-region {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
}

.ap-toast {
  border: 1px solid #EFE9FB;
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--ap-purple-900);
  background: #FFFFFF;
  box-shadow: 0 14px 34px rgba(75, 46, 131, 0.14);
  font-size: 13px;
  font-weight: 550;
  white-space: pre-line;
}

.ap-toast.is-success {
  border-color: rgba(22, 163, 74, 0.18);
  color: #166534;
  background: #F0FDF4;
}

.ap-toast.is-danger {
  border-color: rgba(239, 68, 68, 0.22);
  color: #991B1B;
  background: #FEF2F2;
}

.ap-summary-stack {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.ap-payment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.ap-dashboard-controls .ap-button-secondary.is-active {
  border-color: var(--ap-purple-500);
  color: #FFFFFF;
  background: linear-gradient(135deg, #7B4DCC, #A97CF2);
}

.ap-chart-frame {
  position: relative;
  height: 238px;
  margin-top: 18px;
}

.ap-chart-frame-compact {
  height: 178px;
}

.ap-chart-frame canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.ap-service-chart-shell {
  display: grid;
  grid-template-columns: minmax(160px, 210px) minmax(150px, 1fr);
  align-items: center;
  gap: 16px;
  margin-top: 18px;
}

.ap-service-chart-shell .ap-chart-frame {
  margin-top: 0;
}

.ap-dashboard-legend-list {
  display: grid;
  align-content: start;
  gap: 8px;
  justify-self: end;
  width: min(100%, 230px);
}

.ap-dashboard-legend-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #EFE9FB;
  border-radius: 10px;
  padding: 8px 10px;
  background: #FBFAFF;
}

.ap-dashboard-legend-item span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.ap-dashboard-legend-item strong,
.ap-dashboard-legend-item em,
.ap-dashboard-legend-empty {
  color: var(--ap-muted);
  font-size: 12px;
  font-weight: 600;
}

.ap-dashboard-legend-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ap-dashboard-legend-item em {
  color: var(--ap-purple-900);
  font-style: normal;
}

.ap-dashboard-legend-empty {
  border: 1px dashed var(--ap-border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}

.ap-dashboard-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.ap-dashboard-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.ap-dashboard-row > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  color: var(--ap-purple-700);
  background: var(--ap-purple-100);
  font-weight: 900;
}

.ap-dashboard-row strong {
  display: block;
  overflow: hidden;
  color: var(--ap-ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ap-dashboard-row em {
  color: var(--ap-purple-900);
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.ap-dashboard-bar {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  margin-top: 7px;
  background: var(--ap-purple-100);
}

.ap-dashboard-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7B4DCC, #A97CF2);
}

.ap-summary-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #EFE9FB;
  border-radius: 12px;
  padding: 14px 16px;
  background: #FFFFFF;
  text-decoration: none;
}

.ap-summary-pill-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ap-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ap-summary-pill-label .material-symbols-rounded {
  color: var(--ap-purple-700);
  font-size: 20px;
}

.ap-summary-pill strong {
  color: var(--ap-ink);
  font-size: 15px;
  font-weight: 700;
  text-align: right;
}

.ap-queue-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.ap-queue-card {
  position: relative;
  border: 1px solid #EFE9FB;
  border-radius: 14px;
  padding: 16px;
  background: #FFFFFF;
  box-shadow: var(--ap-shadow-soft);
}

.ap-queue-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 14px 0 0 14px;
  background: linear-gradient(180deg, var(--ap-purple-700), var(--ap-purple-500));
  content: "";
}

.ap-queue-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ap-queue-card h3 {
  margin: 0 0 6px;
  color: var(--ap-ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
}

.ap-queue-card p {
  margin: 0;
  color: var(--ap-muted);
  font-size: 13px;
  font-weight: 450;
}

.ap-queue-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.ap-queue-meta div {
  border-radius: 12px;
  padding: 11px 12px;
  background: var(--ap-purple-100);
}

.ap-queue-meta span {
  display: block;
  color: var(--ap-muted);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
}

.ap-queue-meta strong {
  display: block;
  margin-top: 4px;
  color: var(--ap-ink);
}

.ap-queue-note {
  border-left: 4px solid var(--ap-purple-500);
  border-radius: 12px;
  margin: 0 0 14px !important;
  padding: 10px 12px;
  background: #FAF8FF;
}

.ap-muted-line {
  display: block;
  margin-top: 4px;
  color: var(--ap-muted);
  font-size: 12px;
  font-weight: 450;
}

.ap-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #EFE9FB;
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow: 0 8px 22px rgba(75, 46, 131, 0.035);
}

.ap-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: 13px;
}

.ap-table th,
.ap-table td {
  border-bottom: 1px solid #EFE9FB;
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.ap-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--ap-muted);
  background: #FBFAFF;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ap-table td {
  color: var(--ap-ink);
  font-weight: 450;
}

.ap-table tbody tr:hover {
  background: #FCFBFF;
}

.ap-table tbody tr:last-child td {
  border-bottom: 0;
}

.ap-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}

.ap-status-badge.is-active {
  color: #166534;
  background: #DCFCE7;
}

.ap-status-badge.is-inactive {
  color: #6F6790;
  background: #F4F1FA;
}

.ap-status-badge.is-warning {
  color: #92400E;
  background: #FEF3C7;
}

.ap-status-badge.is-waiting {
  color: #92400E;
  background: #FEF3C7;
}

.ap-status-badge.is-running {
  color: #1E40AF;
  background: #DBEAFE;
}

.ap-status-badge.is-done {
  color: #166534;
  background: #DCFCE7;
}

.ap-status-badge.is-canceled {
  color: #6F6790;
  background: #F4F1FA;
}

.ap-row-details {
  position: relative;
}

.ap-row-details summary {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid #EFE9FB;
  border-radius: 10px;
  padding: 7px 10px;
  color: var(--ap-purple-700);
  background: #FFFFFF;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1;
  list-style: none;
}

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

.ap-row-details summary:hover {
  border-color: rgba(123, 77, 204, 0.3);
  background: #FBFAFF;
}

.ap-row-details[open] summary {
  color: var(--ap-purple-900);
  background: #F0EAFD;
}

.ap-row-details[open] {
  min-width: min(620px, calc(100vw - 80px));
}

.ap-row-details .ap-form {
  border: 1px solid #EFE9FB;
  border-radius: 14px;
  margin-top: 8px;
  padding: 12px;
  background: #FBFAFF;
}

.ap-table td > form {
  margin-top: 8px;
}

.ap-table td > form .ap-button-secondary,
.ap-table td > form .ap-button-danger,
.ap-row-details + .ap-button-secondary,
.ap-row-details + .ap-button-danger {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12.5px;
}

.ap-detail-box {
  display: grid;
  gap: 6px;
  min-width: 280px;
  border: 1px solid #EFE9FB;
  border-radius: 14px;
  margin-top: 10px;
  padding: 12px;
  background: #FFFFFF;
}

.ap-detail-box p {
  margin: 0;
  color: var(--ap-muted);
  font-size: 13px;
  font-weight: 450;
}

.ap-detail-box strong {
  color: var(--ap-ink);
}

.ap-empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 130px;
  border: 1px dashed var(--ap-border);
  border-radius: 14px;
  margin-top: 18px;
  padding: 22px;
  color: var(--ap-muted);
  text-align: center;
}

.ap-empty-state .material-symbols-rounded {
  color: var(--ap-purple-200);
  font-size: 38px;
}

.ap-empty-state p {
  margin: 0;
  font-weight: 500;
}

.ap-empty-state small {
  max-width: 420px;
  color: var(--ap-muted);
  font-size: 12.5px;
  font-weight: 450;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .ap-main {
    padding-inline: 16px;
  }

  .ap-page-hero {
    align-items: flex-start;
    flex-direction: column;
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    min-height: 0;
    padding: 22px;
  }

  .ap-page-hero h1 {
    max-width: calc(100vw - 76px);
  }

  .ap-page-hero div > span {
    max-width: calc(100vw - 120px);
  }

  .ap-page-hero h1 {
    font-size: 28px;
  }

  .ap-page-hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-size: 30px;
  }

  .ap-grid-2,
  .ap-cart-line,
  .ap-queue-grid,
  .ap-form-layout,
  .ap-form,
  .ap-form-compact,
  .ap-search-grid,
  .ap-search-grid-4 {
    grid-template-columns: 1fr;
  }

  .ap-panel,
  .ap-metric-grid {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
  }

  .ap-pdv-workbench > :last-child {
    border-left: 0;
    padding-left: 0;
    position: static;
  }

  .ap-metric-grid {
    grid-template-columns: 1fr;
  }

  .ap-payment-grid {
    grid-template-columns: 1fr;
  }

  .ap-close-header,
  .ap-modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ap-modal {
    padding: 14px;
  }

  .ap-close-totals {
    grid-template-columns: 1fr;
  }

  .ap-chart-frame {
    height: 220px;
  }

  .ap-chart-frame-compact {
    height: 170px;
  }

  .ap-service-chart-shell {
    grid-template-columns: 1fr;
  }

  .ap-dashboard-legend-list {
    justify-self: stretch;
    width: 100%;
  }
}

@media (max-width: 1180px) and (min-width: 761px) {
  .ap-metric-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ap-search-grid-4 {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .ap-grid-2 {
    gap: 14px;
  }
}
