.vtk-page {
  --vtk-ink: #0f2336;
  --vtk-soft: #6e7c8c;
  --vtk-line: #d9e1eb;
  --vtk-line-strong: #c4cfdd;
  --vtk-bg: linear-gradient(180deg, #f4f7fb 0%, #edf2f7 100%);
  --vtk-panel: #ffffff;
  --vtk-blue: #1f7aec;
  --vtk-blue-deep: #155bb4;
  --vtk-cyan: #1fa8c7;
  --vtk-green: #29b14a;
  --vtk-amber: #f2b213;
  --vtk-red: #df3448;
  background: var(--vtk-bg);
  color: var(--vtk-ink);
  min-height: 100vh;
  padding: 1.25rem 0 2.5rem;
}

.vtk-shell {
  margin: 0;
  max-width: none;
  padding: 0;
  width: 100%;
}

.vtk-page-head,
.vtk-title-wrap,
.vtk-breadcrumbs,
.vtk-banner-head,
.vtk-panel-head,
.vtk-modal-head,
.vtk-toolbar-actions,
.vtk-action-row,
.vtk-action-row-end,
.vtk-chip-row {
  align-items: center;
  display: flex;
  gap: 0.8rem;
}

.vtk-page-head {
  justify-content: space-between;
  margin-bottom: 1rem;
}

.vtk-title-wrap {
  gap: 1rem;
}

.vtk-title-icon {
  align-items: center;
  background: linear-gradient(180deg, #f8b233 0%, #f08317 100%);
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(240, 131, 23, 0.22);
  color: #fff;
  display: inline-flex;
  font-size: 1.3rem;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.vtk-page h1,
.vtk-panel h2,
.vtk-modal h2 {
  margin: 0;
}

.vtk-subtitle,
.vtk-panel p,
.vtk-alert span,
.vtk-empty {
  color: var(--vtk-soft);
  margin: 0.35rem 0 0;
}

.vtk-breadcrumbs {
  color: var(--vtk-soft);
  flex-wrap: wrap;
  font-size: 0.88rem;
  justify-content: flex-end;
}

.vtk-breadcrumbs a {
  color: var(--vtk-blue);
  text-decoration: none;
}

.vtk-banner,
.vtk-panel,
.vtk-alert,
.vtk-modal-card {
  background: var(--vtk-panel);
  border: 1px solid var(--vtk-line);
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(15, 35, 54, 0.07);
}

.vtk-banner {
  border-top: 3px solid var(--vtk-amber);
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
}

.vtk-banner-head,
.vtk-panel-head {
  justify-content: space-between;
}

.vtk-panel-head {
  margin-bottom: 1rem;
}

.vtk-panel-head-tabs {
  align-items: flex-start;
}

.vtk-banner-label,
.vtk-section-kicker {
  color: var(--vtk-blue-deep);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vtk-section-kicker {
  display: block;
  margin: 0 0 0.25rem;
}

.vtk-counter-pill,
.vtk-chip,
.vtk-payment-flag,
.vtk-status {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 800;
  gap: 0.4rem;
  min-height: 34px;
  padding: 0 0.9rem;
}

.vtk-counter-pill,
.vtk-chip {
  background: #f4f8fc;
  border: 1px solid var(--vtk-line);
  color: #506478;
}

.vtk-chip-row {
  flex-wrap: wrap;
  margin-top: 1rem;
}

.vtk-panel,
.vtk-alert {
  margin-bottom: 1rem;
  padding: 1.2rem;
}

.vtk-filter-panel {
  border-top: 3px solid var(--vtk-amber);
}

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

.vtk-inline-grid-list {
  align-items: end;
  grid-template-columns: minmax(0, 1.5fr) minmax(180px, 0.8fr) repeat(2, minmax(160px, 0.7fr)) minmax(250px, 1fr);
}

.vtk-inline-grid-top {
  margin-top: 1rem;
}

.vtk-field {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.vtk-field span,
.vtk-table th {
  color: #4d6279;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.vtk-field input,
.vtk-field select,
.vtk-field textarea,
.vtk-table-input {
  background: #fbfdff;
  border: 1px solid var(--vtk-line);
  border-radius: 10px;
  color: var(--vtk-ink);
  min-height: 42px;
  padding: 0.72rem 0.85rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  width: 100%;
}

.vtk-field input:focus,
.vtk-field select:focus,
.vtk-field textarea:focus,
.vtk-table-input:focus {
  border-color: #8ab8f0;
  box-shadow: 0 0 0 3px rgba(31, 122, 236, 0.12);
  outline: none;
}

.vtk-field textarea {
  min-height: 88px;
  resize: vertical;
}

.vtk-field-compact {
  justify-content: flex-end;
}

.vtk-btn,
.vtk-icon-btn,
.vtk-tab {
  appearance: none;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.vtk-btn:hover,
.vtk-icon-btn:hover,
.vtk-tab:hover {
  transform: translateY(-1px);
}

.vtk-btn {
  align-items: center;
  border-radius: 10px;
  display: inline-flex;
  font-weight: 800;
  gap: 0.5rem;
  justify-content: center;
  min-height: 42px;
  padding: 0 1rem;
  text-decoration: none;
}

.vtk-btn-primary {
  background: linear-gradient(180deg, #2a82f2 0%, #1767d1 100%);
  box-shadow: 0 12px 24px rgba(23, 103, 209, 0.22);
  color: #fff;
}

.vtk-btn-secondary {
  background: #eef4fb;
  color: var(--vtk-blue-deep);
}

.vtk-btn-sm {
  min-height: 34px;
  padding: 0 0.8rem;
}

.vtk-btn-block {
  width: 100%;
}

.vtk-icon-btn {
  align-items: center;
  background: #eef4fb;
  border-radius: 10px;
  color: var(--vtk-blue-deep);
  display: inline-flex;
  font-size: 1rem;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.vtk-action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: flex-end;
}

.vtk-action-row-end {
  justify-content: flex-end;
}

.vtk-kpi-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.vtk-kpi-card {
  border-radius: 16px;
  color: #fff;
  min-height: 118px;
  overflow: hidden;
  padding: 1rem 1rem 0.9rem;
  position: relative;
}

.vtk-kpi-card::after {
  background: rgba(255, 255, 255, 0.14);
  bottom: 0;
  content: "";
  height: 22px;
  left: 0;
  position: absolute;
  right: 0;
}

.vtk-kpi-card.is-cyan {
  background: linear-gradient(135deg, #1ea8c6 0%, #1b92af 100%);
}

.vtk-kpi-card.is-green {
  background: linear-gradient(135deg, #29b14a 0%, #20903c 100%);
}

.vtk-kpi-card.is-amber {
  background: linear-gradient(135deg, #f6bb1e 0%, #ecaa06 100%);
  color: #112437;
}

.vtk-kpi-card.is-red {
  background: linear-gradient(135deg, #e64258 0%, #cc263f 100%);
}

.vtk-kpi-value {
  display: block;
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.65rem;
  position: relative;
  z-index: 1;
}

.vtk-kpi-label,
.vtk-kpi-foot {
  display: block;
  position: relative;
  z-index: 1;
}

.vtk-kpi-label {
  font-size: 0.94rem;
  font-weight: 800;
}

.vtk-kpi-foot {
  font-size: 0.82rem;
  margin-top: 0.6rem;
  opacity: 0.92;
}

.vtk-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(320px, 39%) minmax(420px, 61%);
}

.vtk-left,
.vtk-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.vtk-product-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.vtk-product-card {
  background: #fbfdff;
  border: 1px solid var(--vtk-line);
  border-radius: 18px;
  overflow: hidden;
}

.vtk-product-media {
  align-items: center;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #eef5fe 0%, #f8fbff 100%);
  display: flex;
  justify-content: center;
}

.vtk-product-media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.vtk-product-placeholder {
  color: #7f91a5;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.vtk-product-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1rem;
}

.vtk-product-body h3,
.vtk-ticket h3 {
  margin: 0;
}

.vtk-product-body p {
  margin: 0;
}

.vtk-product-meta {
  color: var(--vtk-soft);
  display: flex;
  font-size: 0.86rem;
  gap: 0.7rem;
  justify-content: space-between;
}

.vtk-preview {
  align-items: center;
  background: #f6fbfe;
  border: 1px dashed #9ecbe0;
  border-radius: 16px;
  display: grid;
  gap: 1rem;
  grid-template-columns: 92px 1fr;
  margin-top: 1rem;
  padding: 1rem;
}

.vtk-preview img {
  background: #fff;
  border-radius: 14px;
  height: 92px;
  object-fit: cover;
  width: 92px;
}

.vtk-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.vtk-tab {
  align-items: center;
  background: #edf3f9;
  border-radius: 999px;
  color: var(--vtk-soft);
  display: inline-flex;
  gap: 0.55rem;
  padding: 0.72rem 1rem;
}

.vtk-tab.is-active {
  background: var(--vtk-blue);
  box-shadow: 0 14px 28px rgba(31, 122, 236, 0.22);
  color: #fff;
}

.vtk-tab-close {
  font-size: 1rem;
  line-height: 1;
}

.vtk-table-wrap {
  overflow-x: auto;
}

.vtk-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 100%;
  width: 100%;
}

.vtk-table th,
.vtk-table td {
  border-bottom: 1px solid #e7edf5;
  padding: 0.85rem 0.7rem;
  text-align: left;
  vertical-align: middle;
}

.vtk-table thead th {
  background: #f8fbff;
}

.vtk-table tbody tr:hover {
  background: #fbfdff;
}

.vtk-line-note {
  color: var(--vtk-blue-deep);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.vtk-promo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.vtk-promo-pill {
  align-items: center;
  background: #edf7f3;
  border: 1px solid #cbe6d6;
  border-radius: 999px;
  color: #1c7b34;
  display: inline-flex;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
}

.vtk-status {
  background: #eef3f8;
  color: #506478;
}

.vtk-status.is-PAGADO {
  background: #eaf7ee;
  color: #1d7d33;
}

.vtk-status.is-EMITIDO {
  background: #eef5ff;
  color: var(--vtk-blue-deep);
}

.vtk-status.is-BORRADOR {
  background: #fff6df;
  color: #94610e;
}

.vtk-status.is-PENDIENTE {
  background: #fff1f0;
  color: #b74652;
}

.vtk-status.is-ANULADO {
  background: #f1f3f6;
  color: #6d7681;
}

.vtk-totals-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border-top: 3px solid var(--vtk-blue);
}

.vtk-payment-flag {
  background: #f1f4f8;
  color: #5b6a7c;
}

.vtk-payment-flag.is-ok {
  background: #eaf7ee;
  color: #207f35;
}

.vtk-payment-flag.is-partial {
  background: #fff6df;
  color: #94610e;
}

.vtk-payment-flag.is-pending {
  background: #fff1f0;
  color: #b74652;
}

.vtk-totals-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.vtk-totals-grid div {
  background: #fff;
  border: 1px solid var(--vtk-line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
}

.vtk-totals-grid span {
  color: var(--vtk-soft);
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 0.22rem;
  text-transform: uppercase;
}

.vtk-totals-grid strong {
  font-size: 1.05rem;
}

.vtk-empty,
.vtk-empty-row {
  color: var(--vtk-soft);
  padding: 1rem 0;
  text-align: center;
}

.vtk-alert-warning {
  background: #fff8ef;
  border-color: #f0d6ab;
}

.vtk-modal {
  align-items: center;
  background: rgba(15, 35, 54, 0.56);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1.25rem;
  position: fixed;
  z-index: 9999;
}

.vtk-modal-card {
  max-height: calc(100vh - 2.5rem);
  max-width: 920px;
  overflow: auto;
  padding: 1.2rem;
  width: 100%;
}

.vtk-modal-card-ticket {
  max-width: 540px;
}

.vtk-modal-head {
  justify-content: space-between;
  margin-bottom: 1rem;
}

.vtk-ticket {
  background: #f7fafc;
  border: 1px dashed var(--vtk-line-strong);
  border-radius: 16px;
  padding: 1rem;
}

.vtk-ticket-paper {
  background: #fff;
  color: #000;
  margin: 0 auto;
  max-width: 300px;
  padding: 1rem 0.9rem;
}

.vtk-ticket-paper p,
.vtk-ticket-paper hr {
  margin: 0.28rem 0;
}

.vtk-ticket-line {
  align-items: flex-start;
  display: flex;
  font-size: 0.86rem;
  gap: 0.6rem;
  justify-content: space-between;
  margin: 0.35rem 0;
}

.vtk-ticket-line-amount {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.vtk-ticket-block {
  margin: 0.45rem 0;
}

@media (max-width: 1280px) {
  .vtk-inline-grid-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vtk-action-stack {
    grid-column: span 2;
    justify-content: flex-start;
  }

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

@media (max-width: 1200px) {
  .vtk-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .vtk-page {
    padding-top: 1rem;
  }

  .vtk-page-head,
  .vtk-title-wrap,
  .vtk-breadcrumbs,
  .vtk-banner-head,
  .vtk-panel-head,
  .vtk-modal-head,
  .vtk-action-row,
  .vtk-chip-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .vtk-inline-grid,
  .vtk-inline-grid-list,
  .vtk-preview,
  .vtk-kpi-grid,
  .vtk-product-grid,
  .vtk-totals-grid {
    grid-template-columns: 1fr;
  }

  .vtk-action-stack {
    grid-column: auto;
  }
}

@media print {
  body * {
    visibility: hidden;
  }

  #vtkTicketContent,
  #vtkTicketContent * {
    visibility: visible;
  }

  #vtkTicketContent {
    left: 0;
    position: absolute;
    top: 0;
    width: 80mm;
  }

  .vtk-ticket-paper {
    box-shadow: none;
    max-width: none;
    padding: 0;
    width: 80mm;
  }
}
