.ht-page {
  --ht-theme: var(--app-theme-color, #195ab4);
  --ht-theme-text: var(--app-theme-text-color, #fff);
  --ht-ink: #132b4a;
  --ht-muted: #71839a;
  --ht-line: #dce6f1;
  --ht-soft: #f4f7fb;
  --ht-canvas: #f7f9fc;
  box-sizing: border-box;
  width: 100%;
  padding: 18px 20px 34px;
  color: var(--ht-ink);
  font-family: Nunito, Arial, sans-serif;
}
.ht-page * { box-sizing: border-box; }
.ht-header {
  position: relative;
  overflow: hidden;
  min-height: 126px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  border-radius: 18px;
  margin-bottom: 18px;
  box-shadow: 0 14px 32px color-mix(in srgb, var(--ht-theme) 22%, transparent);
}
.ht-header::after {
  content: "A";
  position: absolute;
  right: 265px;
  top: -70px;
  color: currentColor;
  font: 900 220px/1 Georgia, serif;
  opacity: .055;
  transform: rotate(-8deg);
  pointer-events: none;
}
.ht-header-copy { position: relative; z-index: 1; }
.ht-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
  opacity: .78;
}
.ht-header h1 { margin: 0 0 5px; font-size: 27px; line-height: 1.15; font-weight: 900; }
.ht-header h1 i { margin-right: 8px; }
.ht-header p { margin: 0; font-size: 13px; opacity: .82; }
.ht-actions { position: relative; z-index: 1; display: flex; gap: 9px; }
.ht-btn {
  height: 42px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 10px;
  padding: 0 15px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.ht-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,.14); }
.ht-btn-ghost { background: rgba(255,255,255,.13); color: inherit; }
.ht-btn-solid { background: var(--ht-theme-text); color: var(--ht-theme); }
.ht-btn i { margin-right: 6px; }
.ht-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr) minmax(330px, .92fr);
  gap: 16px;
  align-items: start;
}
.ht-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--ht-line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(31, 57, 87, .065);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.ht-card:hover { border-color: color-mix(in srgb, var(--ht-theme) 28%, var(--ht-line)); box-shadow: 0 12px 30px rgba(31,57,87,.09); }
.ht-card-title {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 13px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--ht-line);
}
.ht-card-title > span {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--ht-theme);
  color: var(--ht-theme-text);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 5px 12px color-mix(in srgb, var(--ht-theme) 20%, transparent);
}
.ht-card-title strong { display: block; color: var(--ht-ink); font-size: 14px; font-weight: 900; }
.ht-card-title small { display: block; margin-top: 2px; color: var(--ht-muted); font-size: 9px; font-weight: 600; }
.ht-live-dot { width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: #21b77a; box-shadow: 0 0 0 5px rgba(33,183,122,.12); }
.ht-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 13px; }
.ht-wide { grid-column: 1 / -1; }
.ht-field { display: block; margin: 0; }
.ht-field > span { display: block; margin: 0 0 6px; color: #415873; font-size: 10px; font-weight: 900; }
.ht-field input, .ht-field select {
  width: 100%;
  height: 42px;
  border: 1px solid #ccd9e8;
  border-radius: 9px;
  padding: 8px 11px;
  background: #fff;
  color: var(--ht-ink);
  font-size: 13px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.ht-field input:hover, .ht-field select:hover { border-color: #adc1d8; }
.ht-field input:focus, .ht-field select:focus { border-color: var(--ht-theme); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ht-theme) 11%, transparent); }
.ht-field input:disabled { background: #f1f4f8; color: #9aa8b7; }
.ht-field small { display: block; min-height: 13px; margin-top: 5px; color: #8a9aac; font-size: 8.5px; line-height: 1.35; }
.ht-input-unit, .ht-money { display: flex; overflow: hidden; border: 1px solid #ccd9e8; border-radius: 9px; background: #fff; transition: border-color .16s, box-shadow .16s; }
.ht-input-unit:focus-within, .ht-money:focus-within { border-color: var(--ht-theme); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ht-theme) 11%, transparent); }
.ht-input-unit input, .ht-money input { border: 0 !important; border-radius: 0; box-shadow: none !important; }
.ht-input-unit b, .ht-money b { display: flex; align-items: center; padding: 0 11px; background: var(--ht-soft); color: #62778f; font-size: 10px; white-space: nowrap; }
.ht-money b { border-right: 1px solid var(--ht-line); }
.ht-input-unit b { border-left: 1px solid var(--ht-line); }
.ht-result { position: sticky; top: 14px; overflow: hidden; }
.ht-result::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--ht-theme); }
.ht-result-intro { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ht-result-intro small { display: block; color: var(--ht-muted); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.ht-job { max-width: 220px; margin-top: 2px; overflow: hidden; color: var(--ht-ink); font-size: 12px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.ht-live-badge { padding: 4px 7px; border-radius: 99px; background: #e9f8f2; color: #159266; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.ht-summary-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 11px; }
.ht-summary-chips span { padding: 5px 8px; border: 1px solid var(--ht-line); border-radius: 7px; background: var(--ht-soft); color: #647890; font-size: 8.5px; font-weight: 800; }
.ht-breakdown { margin: 0; }
.ht-breakdown > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 1px; border-bottom: 1px dashed #dde6ef; }
.ht-breakdown dt { color: #61758d; font-size: 11px; font-weight: 600; }
.ht-breakdown dd { margin: 0; color: var(--ht-ink); font-size: 11px; font-weight: 900; }
.ht-breakdown .ht-subtotal { margin-top: 3px; padding-top: 10px; border-top: 1px solid #cad7e5; border-bottom: 0; }
.ht-breakdown .ht-subtotal dt { font-weight: 900; }
.ht-grand-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 15px 16px;
  border-radius: 12px;
  background: var(--ht-theme);
  color: var(--ht-theme-text);
  box-shadow: 0 9px 20px color-mix(in srgb, var(--ht-theme) 20%, transparent);
}
.ht-grand-total span { display: block; font-size: 10px; font-weight: 900; }
.ht-grand-total small { display: block; margin-top: 2px; font-size: 8px; opacity: .72; }
.ht-grand-total strong { font-size: 22px; font-weight: 900; white-space: nowrap; }
.ht-per-letter { margin: 9px 2px 0; color: #71849a; font-size: 9px; text-align: right; }
.ht-formula { margin-top: 12px; padding: 9px 11px; border-left: 3px solid var(--ht-theme); border-radius: 7px; background: var(--ht-soft); color: #60758c; font-size: 8.5px; line-height: 1.5; }
.ht-note { margin: 10px 0 0; color: #8495a7; font-size: 8px; line-height: 1.45; }
.ht-note i { color: var(--ht-theme); }
@media (max-width: 1280px) {
  .ht-layout { grid-template-columns: 1fr 1fr; }
  .ht-result { grid-column: 1 / -1; position: static; }
}
@media (max-width: 767px) {
  .ht-page { padding: 10px; }
  .ht-header { min-height: 0; align-items: flex-start; flex-direction: column; padding: 20px; }
  .ht-header h1 { font-size: 22px; }
  .ht-actions { width: 100%; }
  .ht-btn { flex: 1; }
  .ht-layout { grid-template-columns: 1fr; }
  .ht-result { grid-column: auto; }
  .ht-grid { grid-template-columns: 1fr; }
  .ht-wide { grid-column: auto; }
  .ht-grand-total { align-items: flex-start; flex-direction: column; }
}
@media print {
  .no-print, .main-header, .main-sidebar, .main-footer { display: none !important; }
  .content-wrapper { margin: 0 !important; }
  .ht-page { padding: 0; }
  .ht-header, .ht-card, .ht-grand-total { box-shadow: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .ht-layout { grid-template-columns: 1fr 1fr; }
  .ht-result { grid-column: 1 / -1; position: static; }
}
