/* ==========================================================================
   Adzra Billing — voucher page (v1)
   Loaded after adzra-theme-v2.css. Scoped to the .vz-* namespace.
   ========================================================================== */

.vz-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ------------------------------------------------------------------ head --- */
.vz-head {
  position: relative;
  overflow: hidden;
  padding: 16px 18px;
  background: var(--az-surface);
  border: 1px solid var(--az-line);
  border-radius: var(--az-radius-lg);
  box-shadow: var(--az-shadow);
}

.vz-head::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--az-blue), var(--az-teal) 45%, var(--az-lime));
}

.vz-head-row {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-wrap: wrap;
}

.vz-head-icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 20px;
  color: #fff;
  background: linear-gradient(135deg, #0b7fb0, #00998f 55%, #0aa06e);
  box-shadow: 0 12px 22px -14px rgba(4, 104, 114, .95),
    inset 0 1px 0 rgba(255, 255, 255, .25);
}

.vz-head-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.vz-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
  color: var(--az-ink);
}

.vz-sub {
  margin: 3px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--az-muted);
}

.vz-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

/* ---------------------------------------------------------------- search --- */
.vz-search {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.vz-search .fa {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #90a8af;
  pointer-events: none;
}

.vz-search input {
  width: 208px;
  height: 36px;
  padding: 0 12px 0 30px;
  border: 1px solid var(--az-line-strong);
  border-radius: 10px;
  background: #fbfdfd;
  color: var(--az-ink);
  font-size: 13px;
  line-height: 1;
  outline: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.vz-search input::placeholder { color: #9db3ba; }

.vz-search input:focus {
  background: #fff;
  border-color: var(--az-teal);
  box-shadow: var(--az-ring);
}

/* --------------------------------------------------------------- buttons --- */
.vz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid var(--az-line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--az-ink-soft);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease,
    color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.vz-btn:hover {
  background: var(--az-wash);
  border-color: #bcd8d5;
  color: #006f6b;
  text-decoration: none;
  transform: translateY(-1px);
}

.vz-btn:focus-visible {
  outline: 0;
  box-shadow: var(--az-ring);
}

.vz-btn i { font-size: 12px; }

.vz-btn--primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(112deg, #0b7fb0, #00998f 50%, #0aa06e);
  box-shadow: 0 12px 22px -16px rgba(4, 104, 114, .95);
}

.vz-btn--primary:hover {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(112deg, #0a729e, #008d84 50%, #099365);
}

/* --------------------------------------------------------------- summary --- */
.vz-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.vz-stat {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 11px 14px;
  background: var(--az-surface);
  border: 1px solid var(--az-line);
  border-radius: 14px;
  box-shadow: var(--az-shadow-sm);
  box-sizing: border-box;
}

.vz-stat-ico {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border-radius: 13px;
  font-size: 16px;
  line-height: 1;
  color: var(--az-teal);
  background: var(--az-wash);
  border: 1px solid #dceceb;
}

.vz-stat-ico .fa {
  display: block;
  line-height: 1;
}

.vz-stat:nth-child(2) .vz-stat-ico {
  color: var(--az-blue);
  background: #eef5fa;
  border-color: #dbe8f2;
}

.vz-stat:nth-child(3) .vz-stat-ico {
  color: #8a5c0a;
  background: #fdf5e4;
  border-color: #f4e8cd;
}

.vz-stat-body {
  min-width: 0;
  line-height: 1.15;
}

.vz-stat b {
  display: block;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--az-ink);
  font-variant-numeric: tabular-nums;
}

.vz-stat-body span {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--az-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ------------------------------------------------------------------ grid --- */
.vz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
  align-items: stretch;
}

/* ------------------------------------------------------------------ card --- */
.vz-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 15px 16px 14px;
  background: #fff;
  border: 1px solid var(--az-line);
  border-radius: 16px;
  box-shadow: var(--az-shadow-sm);
  overflow: hidden;
  transition: border-color .16s ease, box-shadow .18s ease, transform .18s ease;
}

.vz-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--vz-accent, var(--az-teal));
  opacity: .9;
}

.vz-card:hover {
  border-color: #c9e2df;
  box-shadow: var(--az-shadow);
  transform: translateY(-2px);
}

.vz-card[hidden] { display: none; }

/* tone tokens: accent for the bar/icon, deep for readable small text */
.vz-tone-teal   { --vz-accent: #00998f; --vz-deep: #006b62; --vz-soft: #e9f7f5; --vz-line: #d3efe9; }
.vz-tone-blue   { --vz-accent: #0b7fb0; --vz-deep: #0a5f85; --vz-soft: #eaf5fb; --vz-line: #d8eaf5; }
.vz-tone-green  { --vz-accent: #0aa06e; --vz-deep: #06724f; --vz-soft: #e9f7ef; --vz-line: #d6efe2; }
.vz-tone-amber  { --vz-accent: #d3911c; --vz-deep: #8a5c0a; --vz-soft: #fdf4e3; --vz-line: #f5e5c8; }
.vz-tone-violet { --vz-accent: #7c5cd6; --vz-deep: #5b42a8; --vz-soft: #f2eefb; --vz-line: #e4dbf8; }
.vz-tone-cyan   { --vz-accent: #1198b2; --vz-deep: #0a6b7d; --vz-soft: #e9f7fa; --vz-line: #d4eef3; }
.vz-tone-indigo { --vz-accent: #5a66d8; --vz-deep: #3a45a8; --vz-soft: #eef0fc; --vz-line: #dee2f8; }
.vz-tone-slate  { --vz-accent: #557580; --vz-deep: #3f5b64; --vz-soft: #f0f5f6; --vz-line: #e1eaec; }

.vz-card-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-width: 0;
}

.vz-ticket {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 16px;
  color: var(--vz-accent, var(--az-teal));
  background: var(--vz-soft, #e9f7f5);
  border: 1px solid var(--vz-line, #d3efe9);
}

.vz-card-id {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 1px;
}

.vz-name {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--az-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vz-count {
  display: inline-flex;
  align-items: center;
  margin-top: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--vz-deep, #006b62);
  background: var(--vz-soft, #e9f7f5);
  border: 1px solid var(--vz-line, #d3efe9);
  white-space: nowrap;
}

.vz-icon-btn {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: #8aa2a9;
  font-size: 13px;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}

.vz-icon-btn:hover {
  color: var(--az-teal);
  background: var(--az-wash);
  border-color: #dceceb;
}

/* ----------------------------------------------------------------- facts --- */
.vz-facts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 11px 0 0;
  border-top: 1px dashed #e8f0f1;
}

.vz-facts > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.vz-facts dt {
  margin: 0;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #8aa0a7;
  white-space: nowrap;
}

.vz-facts dd {
  margin: 0;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--az-ink-soft);
  text-align: right;
  overflow-wrap: anywhere;
}

.vz-fact-note {
  font-weight: 500;
  color: var(--az-muted);
}

/* ----------------------------------------------------------------- price --- */
.vz-price {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 11px;
  background: #f7fbfb;
  border: 1px solid #e6f0f1;
}

.vz-price > span {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1 1 90px;
  min-width: 0;
}

.vz-price em {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #90a6ad;
}

.vz-price b {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--az-ink);
  overflow-wrap: anywhere;
}

.vz-price > span + span b { color: var(--vz-deep, var(--az-teal)); }

/* --------------------------------------------------------------- actions --- */
.vz-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #eef4f5;
}

.vz-actions .vz-btn {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}

/* ----------------------------------------------------------------- empty --- */
.vz-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 42px 18px;
  text-align: center;
  background: var(--az-surface);
  border: 1px dashed #d7e6e8;
  border-radius: 16px;
}

.vz-empty[hidden] { display: none; }

.vz-empty-ico {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
  border-radius: 15px;
  font-size: 20px;
  color: var(--az-teal);
  background: var(--az-wash);
  border: 1px solid #dceceb;
}

.vz-empty h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--az-ink);
}

.vz-empty p {
  margin: 0;
  max-width: 390px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--az-muted);
}

.vz-empty .vz-btn { margin-top: 8px; }

.vz-empty--filter {
  padding: 30px 16px;
  background: #fbfdfd;
  border-style: solid;
  box-shadow: none;
}

.vz-empty--filter .fa {
  font-size: 18px;
  color: #9db3ba;
}

/* -------------------------------------------------------------- responsive --- */
@media (max-width: 1100px) {
  .vz-grid { grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); }
}

@media (max-width: 820px) {
  .vz-head-actions { margin-left: 0; width: 100%; }
  .vz-search { flex: 1 1 100%; }
  .vz-search input { width: 100%; }
  .vz-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vz-stat:last-child { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .vz-grid { grid-template-columns: 1fr; }
  .vz-summary { grid-template-columns: 1fr; }
  .vz-stat:last-child { grid-column: auto; }
  .vz-head { padding: 14px; }
  .vz-title { font-size: 18px; }
}

/* ------------------------------------------------------------------ print --- */
@media print {
  .vz-head-actions,
  .vz-actions { display: none; }
  .vz-card { break-inside: avoid; box-shadow: none; }
  .vz-card:hover { transform: none; }
}