:root {
  --ink: #202636;
  --muted: #6b7280;
  --line: #e1e6ee;
  --surface: #ffffff;
  --soft: #f6f8fb;
  --brand: #1f6feb;
  --ok: #16845c;
  --profile-color: #f8fbfd;
  --profile-stroke: #5d7285;
  --font-main: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-tight: "Roboto Condensed", "Nunito", system-ui, sans-serif;
}

body {
  background: #f5f7fa;
  color: var(--ink);
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 400;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

.btn {
  --bs-btn-padding-y: .36rem;
  --bs-btn-padding-x: .68rem;
  --bs-btn-font-size: .86rem;
  --bs-btn-border-radius: 5px;
  font-weight: 500;
}

.btn-sm {
  --bs-btn-padding-y: .24rem;
  --bs-btn-padding-x: .48rem;
  --bs-btn-font-size: .78rem;
}

.v2-submit-quote-button {
  min-width: 154px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .52rem;
  transition: opacity .2s ease, transform .2s ease, background-color .2s ease;
}

.v2-submit-quote-button.is-loading {
  cursor: wait;
  opacity: .88;
  transform: none;
}

.v2-submit-quote-spinner {
  display: none;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 2px solid rgba(255, 255, 255, .42);
  border-top-color: #fff;
  border-radius: 50%;
  animation: v2-submit-spin .7s linear infinite;
}

.v2-submit-quote-button.is-loading .v2-submit-quote-spinner {
  display: inline-block;
}

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

@media (prefers-reduced-motion: reduce) {
  .v2-submit-quote-spinner { animation-duration: 1.4s; }
}

.form-control,
.form-select {
  min-height: 36px;
  border-color: var(--line);
  border-radius: 5px;
  font-size: .88rem;
}

.form-floating > .form-control,
.form-floating > .form-select {
  min-height: 48px;
  height: 48px;
  padding-top: 1.18rem;
  padding-bottom: .34rem;
}

.form-floating > label {
  padding: .78rem .75rem;
  color: var(--muted);
  font-size: .82rem;
}

.small,
small,
.quote-item span,
.mini-cart-button__text em {
  font-family: var(--font-tight);
}

.navbar {
  --bs-navbar-padding-y: .42rem;
  z-index: 1045;
}

.app-navbar {
  min-height: 56px;
  background: #fff;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
}

.app-navbar > .container {
  position: relative;
  z-index: 1;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .94rem;
  letter-spacing: -.01em;
}

.navbar-logo {
  width: auto;
  max-width: 152px;
  max-height: 42px;
  object-fit: contain;
}

.brand-logo {
  width: auto;
  max-width: 120px;
  height: 34px;
  object-fit: contain;
}

.icon-only {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.calculator-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(360px, .78fr);
  gap: 18px;
  align-items: start;
}

.calculator-panel,
.preview-panel,
.surface,
.auth-box,
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 10px 26px rgba(31, 41, 55, .045);
}

.calculator-panel,
.preview-panel,
.auth-box {
  padding: 18px;
}

.preview-panel {
  position: sticky;
  top: 4rem;
}

.calculator-hero {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.calculator-hero__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.calculator-company-logo {
  width: auto;
  max-width: 160px;
  max-height: 56px;
  object-fit: contain;
  flex: 0 0 auto;
}

.grid-3,
.choice-grid,
.form-grid,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.choice-card {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 82px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.choice-card input {
  position: absolute;
  inset: 10px 10px auto auto;
}

.choice-card strong {
  font-size: .9rem;
  line-height: 1.2;
}

.choice-card span {
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.3;
}

.color-choice {
  padding-left: 11px;
}

.color-swatch {
  width: 100%;
  height: 58px;
  border: 1px solid rgba(0, 0, 0, .2);
  border-radius: 4px;
}

.visual-choice img,
.image-placeholder {
  width: 100%;
  height: 74px;
  box-sizing: border-box;
  padding: .5rem;
  object-fit: contain;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #f8fbfd;
  border-radius: 4px;
  color: var(--muted);
  font-weight: 700;
}

.profile-choice {
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 78px;
}

.profile-choice input {
  inset: 8px 8px auto auto;
}

.profile-choice__media {
  display: block;
  width: 70px;
  height: 56px;
}

.profile-choice__media img,
.profile-choice__media .image-placeholder {
  width: 100%;
  height: 100%;
  padding: .5rem;
}

.profile-choice__body {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding-right: 18px;
}

.profile-choice__body > span {
  margin: 0;
}

.choice-section-title,
.additional-choice-group {
  display: grid;
  gap: 8px;
}

.choice-section-title,
.additional-choice-group__title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 2px 1px 0;
}

.choice-grid + .choice-section-title {
  margin-top: 14px;
}

.choice-grid + .additional-choice-group,
.additional-choice-group + .choice-grid,
.additional-choice-group + .additional-choice-group {
  margin-top: 14px;
}

.choice-section-title strong,
.additional-choice-group__title strong {
  font-size: .88rem;
  line-height: 1.2;
}

.choice-section-title span,
.additional-choice-group__title span {
  color: var(--muted);
  font-size: .78rem;
}

.additional-empty-choice .image-placeholder {
  color: #94a3b8;
  background: #f8fafc;
}

.choice-card:has(input:checked) {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(31, 111, 235, .12);
  background: #fbfdff;
}

.choice-card.is-disabled {
  opacity: .45;
  pointer-events: none;
}

.quote-quantity-stepper input::-webkit-outer-spin-button,
.quote-quantity-stepper input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.result-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.mini-cart-button {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 8px 18px rgba(31, 41, 55, .04);
}

.mini-cart-button__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef4fb;
  color: var(--brand);
  font-size: 1rem;
}

.mini-cart-button__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.mini-cart-button__text strong {
  font-size: .82rem;
  line-height: 1.1;
}

.mini-cart-button__text em {
  color: var(--muted);
  font-size: .72rem;
  font-style: normal;
}

.mini-cart-button.is-cart-pulse {
  border-color: rgba(37, 99, 235, .45);
  box-shadow: 0 10px 24px rgba(37, 99, 235, .14);
  transform: translateY(-1px);
}

.v2-cart-calculate.is-hidden {
  display: none;
}

.cart-add-status {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 1080;
  max-width: min(420px, calc(100vw - 32px));
  padding: 10px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: rgba(239, 246, 255, .97);
  color: #1e3a8a;
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .16);
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.cart-add-status.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.cart-flyer {
  position: fixed;
  z-index: 1100;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(37, 99, 235, .24);
  border-radius: 50%;
  background: #fff;
  color: var(--brand);
  box-shadow: 0 12px 28px rgba(31, 41, 55, .18);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: cart-fly .72s cubic-bezier(.22, .9, .28, 1) forwards;
}

@keyframes cart-fly {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(.72);
  }
  15% {
    opacity: 1;
  }
  72% {
    opacity: 1;
    transform: translate(calc(-50% + var(--cart-fly-x)), calc(-50% + var(--cart-fly-y))) scale(.82);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--cart-fly-x)), calc(-50% + var(--cart-fly-y))) scale(.35);
  }
}

.quote-cart-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.quote-cart-modal {
  border: 0;
  border-radius: 10px;
  overflow: hidden;
}

.modal.fade .modal-dialog {
  transform: translateY(14px) scale(.985) !important;
  transition: transform .24s ease-out, opacity .24s ease-out !important;
}

.modal.show .modal-dialog {
  transform: translateY(0) scale(1) !important;
}

.modal.fade {
  transition: opacity .18s ease-out !important;
}

.v2-static-cart {
  min-width: 0;
}

.v2-cart-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 12px;
}

.v2-cart-actions:has(.v2-cart-calculate.is-hidden) {
  grid-template-columns: minmax(0, 1fr) 0;
  gap: 0;
}

.v2-cart-calculate {
  min-width: 116px;
  padding-inline: 20px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}

.v2-cart-calculate:hover,
.v2-cart-calculate:focus-visible {
  background: #155fd6;
  color: #fff;
}

.quote-items-empty {
  color: var(--muted);
  font-size: .86rem;
}

.quote-items-list {
  display: grid;
  gap: 8px;
}

.quote-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8fbfd;
}

.quote-item__image {
  width: 64px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--muted);
  overflow: hidden;
}

.quote-item__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.quote-item__image svg {
  width: 100%;
  height: 100%;
  display: block;
}

.quote-item__main {
  min-width: 0;
}

.quote-item__controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quote-quantity-stepper {
  display: inline-grid;
  grid-template-columns: 24px 36px 24px;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
}

.quote-quantity-stepper button,
.quote-quantity-stepper input {
  height: 28px;
  border: 0;
  background: transparent;
  text-align: center;
  font-weight: 800;
}

.quote-quantity-stepper button {
  color: var(--brand);
}

.quote-item span {
  display: block;
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.35;
}

.quote-item strong {
  display: block;
  font-size: .8rem;
  line-height: 1.2;
}

.price-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.price-line.total {
  font-size: 1.05rem;
  color: var(--ok);
  border-bottom: 0;
}

.admin-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 16px;
}

.admin-nav {
  display: grid;
  gap: 3px;
  align-content: start;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  padding: 7px 9px;
  border-radius: 5px;
  font-size: .88rem;
}

.admin-nav i {
  width: 18px;
  color: var(--muted);
  font-size: .92rem;
  text-align: center;
}

.admin-nav a:hover {
  background: #eef3f9;
}

.surface {
  padding: 14px;
}

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

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

.auth-box {
  max-width: 420px;
  margin: 48px auto;
}

.metric {
  padding: 14px;
}

.metric span {
  color: var(--muted);
}

.metric strong {
  display: block;
  font-size: 1.6rem;
}

.admin-image-preview img {
  max-width: 180px;
  max-height: 120px;
  object-fit: contain;
  display: block;
  margin: 8px 0;
  border: 1px solid var(--line);
  background: #fff;
}

.calc-table .calc-catalog-image-column {
  width: 96px;
}

.calc-table .calc-catalog-image-cell {
  width: 96px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.calc-catalog-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 58px;
  overflow: hidden;
  background: #f7f9fc;
  border: 1px solid #e1e8f0;
  border-radius: 10px;
}

.calc-catalog-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
  background: #fff;
}

.calc-catalog-thumb--drawing {
  background: #fff;
}

.calc-catalog-thumb--drawing svg {
  display: block;
  width: 62px;
  height: 48px;
}

.calc-catalog-thumb--empty {
  color: #9aaabd;
  font-size: 20px;
}

.admin-help {
  margin-top: -10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
  font-size: .84rem;
}

.admin-help strong,
.admin-help b {
  color: var(--ink);
}

.admin-help pre {
  margin: 8px 0 12px;
  padding: 12px;
  overflow-x: auto;
  border: 1px solid #dbe5ef;
  border-radius: 6px;
  background: #ffffff;
  color: #243244;
  font-size: .84rem;
}

.admin-config-builder {
  position: relative;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.admin-config-builder__header {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.admin-config-builder[data-layout-builder] .admin-config-builder__header {
  display: flex;
  justify-content: center;
}

.config-top-field {
  grid-column: auto;
}

.config-top-field textarea {
  min-height: 36px;
  height: 36px;
  resize: vertical;
}

.admin-config-builder__header strong,
.admin-config-builder__hardware strong {
  display: block;
  color: var(--ink);
}

.admin-config-builder__header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .84rem;
}

.admin-config-builder__header > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: .76rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  background: #f8fafc;
}

.admin-config-preview-wrap {
  position: relative;
  width: min(100%, 720px);
  min-width: min(100%, 720px);
  height: 420px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background-color: #f8fbfd;
  background-image:
    linear-gradient(#eaf1f7 1px, transparent 1px),
    linear-gradient(90deg, #eaf1f7 1px, transparent 1px),
    linear-gradient(#f4f8fb 1px, transparent 1px),
    linear-gradient(90deg, #f4f8fb 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 8px 8px, 8px 8px;
}

.admin-config-preview {
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
}

.admin-config-dimensions {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.admin-config-dimension-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.admin-config-dimension-lines line {
  stroke: #b7cfdd;
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}

.admin-config-dimension-lines line.is-total {
  stroke: #a8c4d4;
}

.admin-config-dimension-lines line.is-local-section {
  stroke: #9fc7c1;
}

.admin-config-dimension-lines marker path {
  fill: #b7cfdd;
}

.admin-config-dimensions input {
  position: absolute;
  width: 54px;
  height: 24px;
  padding: 2px 6px;
  transform: translate(-50%, -50%);
  border: 1px solid #c9d8e3;
  border-radius: 5px;
  background: rgba(255, 255, 255, .94);
  color: var(--ink);
  font: 700 .76rem/1 "Roboto Condensed", "Nunito", sans-serif;
  text-align: center;
  pointer-events: auto;
}

.admin-config-dimensions input.is-vertical {
  transform: translate(-50%, -50%) rotate(-90deg);
}

.admin-config-dimensions input::-webkit-outer-spin-button,
.admin-config-dimensions input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.admin-config-dimensions input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.admin-config-dimensions input.is-internal {
  border-color: rgba(37, 99, 235, .36);
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .12);
}

.admin-config-dimensions input.is-local-section {
  width: 50px;
  border-color: rgba(15, 118, 110, .3);
  background: rgba(255, 255, 255, .98);
}

.admin-config-dimensions input.is-vertical.is-local-section {
  width: 50px;
  height: 24px;
}

.admin-opening-popover {
  z-index: 45;
  width: 258px;
  padding: 8px;
}

.admin-opening-popover__divider {
  margin: 7px -1px 3px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-opening-popover__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.admin-opening-popover__grid button {
  margin-top: 0;
  min-height: 34px;
  padding: 5px 7px;
  font-size: .76rem;
}

.admin-opening-popover__grid button::after {
  content: none !important;
}

.admin-opening-popover button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.admin-config-builder__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-impost-builder {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-impost-group {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.admin-impost-group__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.admin-impost-group p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .82rem;
}

.admin-internal-mullions {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.admin-internal-mullions p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .82rem;
}

.admin-impost-list {
  display: grid;
  gap: 6px;
}

.admin-impost-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px auto 32px;
  gap: 6px;
  align-items: center;
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.admin-internal-mullion-row {
  display: grid;
  grid-template-columns: 110px minmax(180px, 1fr) auto 32px;
  gap: 6px;
  align-items: end;
}

.admin-internal-mullion-row span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}

.admin-internal-mullion-row em {
  padding-bottom: 8px;
  color: var(--muted);
  font-style: normal;
}

.admin-impost-row em {
  color: var(--muted);
  font-style: normal;
}

.admin-config-builder__hardware {
  display: grid;
  grid-template-columns: repeat(3, minmax(80px, 120px));
  gap: 8px;
  align-items: end;
  margin: 12px 0;
}

.admin-config-builder__hardware strong {
  grid-column: 1 / -1;
}

.admin-config-builder__hardware label {
  color: var(--muted);
  font-weight: 700;
}

.admin-config-builder__technical {
  margin-top: 12px;
}

.admin-config-builder__technical summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}

.admin-size-limits {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfdff;
}

.admin-size-limits[open] {
  padding-bottom: 14px;
}

.admin-advanced-grid {
  margin-top: 10px;
}

.profile-colors-editor {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}

.profile-colors-editor__head,
.profile-color-row {
  display: grid;
  grid-template-columns: 96px minmax(140px, 1.1fr) 74px minmax(150px, .9fr) minmax(210px, 1.35fr) 1fr 1fr 74px 42px;
  gap: 8px;
  align-items: center;
}

.profile-colors-editor__head {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.profile-color-row {
  margin-bottom: 8px;
}

.profile-color-row .form-control-color {
  min-height: 38px;
  width: 100%;
}

.profile-color-texture {
  display: flex;
  gap: 6px;
  align-items: center;
}

.profile-color-texture img {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: cover;
}

.profile-color-side {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.1;
}

.profile-color-side label {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  margin: 0;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .calculator-shell,
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .preview-panel {
    order: -1;
    position: static;
    top: auto;
  }
  .calculator-panel {
    order: 1;
  }
  .grid-3,
  .choice-grid,
  .form-grid,
  .admin-config-builder__grid,
  .admin-config-builder__hardware,
  .admin-impost-builder {
    grid-template-columns: 1fr;
  }
  .quote-item {
    grid-template-columns: 56px minmax(0, 1fr);
  }
  .quote-item__controls {
    grid-column: 1 / -1;
    justify-content: space-between;
  }
}

@media (max-width: 560px) {
  .calculator-panel,
  .preview-panel,
  .auth-box {
    padding: 16px;
  }
  .calculator-hero__head {
    align-items: flex-start;
  }
  .calculator-company-logo {
    max-width: 110px;
    max-height: 42px;
  }
}

.v2-calculator {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, .86fr) minmax(520px, 1.14fr);
  gap: 18px;
  align-items: start;
}

.v2-panel,
.v2-preview-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(31, 41, 55, .06);
}

.v2-panel {
  padding: 18px;
}

.v2-section-title {
  margin-bottom: 16px;
}

.v2-section-title span,
.v2-preview-head span,
.v2-selected-summary span {
  display: block;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.v2-section-title h2 {
  margin: 2px 0 4px;
  font-size: 1.18rem;
  line-height: 1.15;
}

.v2-section-title p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
}

.v2-control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.v2-material-switch {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f7fb;
}

.v2-material-switch .btn {
  border: 0;
  color: var(--muted);
  font-weight: 800;
}

.v2-material-switch .btn-check:checked + .btn {
  color: #fff;
  background: var(--brand);
}

.v2-material-switch .btn-check:disabled + .btn {
  opacity: .45;
  cursor: not-allowed;
}

.v2-choice-title {
  margin: 4px 0 9px;
  color: var(--ink);
  font-size: .82rem;
  font-weight: 900;
}

.v2-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.v2-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 900;
  text-align: center;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.v2-tabs button.is-active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.v2-product-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fbfd;
}

.v2-product-row span {
  display: block;
  color: var(--muted);
  font-size: .66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.v2-product-row strong {
  display: block;
  font-size: .92rem;
}

.v2-quantity-control {
  display: inline-grid;
  grid-template-columns: 32px 42px 32px;
  align-items: center;
  height: 36px;
  border: 1px solid #d8e5f0;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(31, 41, 55, .04);
}

.v2-quantity-control button,
.v2-quantity-control input {
  height: 34px;
  border: 0;
  background: transparent;
  text-align: center;
  font-weight: 900;
}

.v2-quantity-control button {
  color: var(--brand);
  font-size: 1rem;
  line-height: 1;
}

.v2-quantity-control button:hover {
  background: #eef5ff;
}

.v2-quantity-control input {
  width: 42px;
  color: var(--ink);
  font-size: .9rem;
  font-family: "Roboto Condensed", "Nunito", sans-serif;
}

.v2-quantity-control input:focus {
  outline: 0;
  background: #f8fbfd;
}

.v2-tab-panel {
  display: none;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.v2-tab-panel.is-active {
  display: block;
}

.v2-tab-heading {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.v2-tab-heading > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef4fb;
  color: var(--brand);
  font-size: .82rem;
  font-weight: 900;
}

.v2-tab-heading strong {
  display: block;
  font-size: .92rem;
  line-height: 1.15;
}

.v2-tab-heading em {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  font-style: normal;
  line-height: 1.25;
}

.v2-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.v2-template-section {
  margin-top: 12px;
}

.v2-template-section h3 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 900;
}

.v2-template-card {
  position: relative;
  min-height: 112px;
  display: grid;
  grid-template-rows: 96px auto;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.v2-template-card:hover {
  border-color: rgba(37, 99, 235, .38);
  transform: translateY(-1px);
}

.v2-template-card input {
  position: absolute;
  top: 9px;
  right: 9px;
}

.v2-template-card:has(input:checked) {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, .25);
}

.v2-template-card img,
.v2-template-card > span,
.v2-card-preview {
  width: 100%;
  height: 96px;
  display: grid;
  place-items: center;
  padding: .5rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8fbfd;
  object-fit: contain;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 900;
}

.v2-card-preview {
  display: block;
}

.v2-card-frame {
  fill: #fff;
  stroke: #1f2937;
  stroke-width: .75;
}

.v2-card-sash {
  fill: #fff;
  stroke: #334155;
  stroke-width: .58;
}

.v2-card-glass {
  fill: #d7e5f6;
  stroke: #9aa9b8;
  stroke-width: .45;
}

.v2-card-bead {
  stroke: #d5dde5;
  stroke-linecap: square;
  stroke-width: .34;
}

.v2-card-opening,
.v2-card-fix {
  fill: none;
  stroke: #7b8a99;
  stroke-linecap: round;
  stroke-width: .5;
}

.v2-card-opening {
  stroke-dasharray: 4 3;
}

.v2-card-handle {
  fill: #fff;
  stroke: #64748b;
  stroke-width: .45;
}

.v2-card-track {
  stroke: #52606d;
  stroke-width: .45;
}

.v2-card-track-block {
  fill: #fff;
  stroke: #52606d;
  stroke-width: .45;
}

.v2-card-joint {
  stroke: #c8d2dc;
  stroke-width: .4;
}

.v2-template-card strong {
  padding-right: 18px;
  font-size: .82rem;
  line-height: 1.18;
}

.v2-additional-group {
  margin-top: 14px;
}

.v2-additional-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.v2-extra-card {
  position: relative;
  min-height: 102px;
  display: grid;
  grid-template-rows: 58px auto auto;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.v2-extra-card:hover {
  border-color: rgba(37, 99, 235, .38);
  transform: translateY(-1px);
}

.v2-extra-card > input {
  position: absolute;
  top: 8px;
  right: 8px;
}

.v2-extra-card:has(input:checked) {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, .25);
}

.v2-extra-card img,
.v2-extra-card .image-placeholder {
  width: 100%;
  height: 58px;
  display: grid;
  place-items: center;
  padding: .5rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8fbfd;
  object-fit: contain;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
}

.v2-extra-card strong {
  padding-right: 18px;
  font-size: .78rem;
  line-height: 1.18;
}

.v2-extra-quantity {
  display: none;
  width: 94px;
  height: 28px;
  grid-template-columns: 28px 38px 28px;
  align-items: stretch;
  justify-self: start;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.v2-extra-card:has(> input:checked) .v2-extra-quantity {
  display: grid;
}

.v2-extra-quantity button,
.v2-extra-quantity input {
  position: static;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
  font-size: .78rem;
  font-weight: 700;
}

.v2-extra-quantity button {
  color: var(--brand);
}

.v2-preview-card {
  padding: 18px;
}

.v2-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.v2-preview-head strong {
  display: block;
  font-size: 1rem;
}

.v2-preview-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.v2-action-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-top: 12px;
}

.v2-add-button {
  min-width: 176px;
  background: var(--brand);
  color: #fff;
}

.v2-add-button:hover,
.v2-add-button:focus {
  background: #1d4ed8;
  color: #fff;
}

.v2-drawing-wrap {
  position: relative;
  height: clamp(280px, var(--preview-image-height), 560px);
  border: 1px solid #d7e2eb;
  border-radius: 8px;
  overflow: hidden;
  background-color: #fbfdff;
  background-image:
    linear-gradient(#eaf1f7 1px, transparent 1px),
    linear-gradient(90deg, #eaf1f7 1px, transparent 1px),
    linear-gradient(#f4f8fb 1px, transparent 1px),
    linear-gradient(90deg, #f4f8fb 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px, 10px 10px, 10px 10px;
}

.v2-view-switch {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 5;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 9px;
  border: 1px solid rgba(203, 213, 225, .9);
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  color: #334155;
  font-size: .76rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(31, 41, 55, .06);
}

.v2-view-switch .form-switch {
  min-height: 0;
  padding-left: 0;
  display: inline-flex;
  align-items: center;
}

.v2-view-switch .form-check-input {
  width: 2.25rem;
  height: 1.15rem;
  margin: 0;
  cursor: pointer;
}

.v2-limit-toast {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 1080;
  max-width: min(420px, calc(100vw - 32px));
  padding: 10px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: rgba(239, 246, 255, .96);
  color: #1e3a8a;
  font-size: .86rem;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .16);
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.v2-limit-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.v2-drawing {
  width: 100%;
  height: 100%;
  display: block;
}

.v2-frame {
  fill: var(--v2-profile-fill, var(--v2-profile-color, #fff));
  stroke: #172033;
  stroke-width: 1.4;
}

.v2-product-layer.is-exterior .v2-frame {
  stroke-width: 1.65;
}

.v2-sash {
  fill: var(--v2-profile-fill, var(--v2-profile-color, #fff));
  stroke: #1f2937;
  stroke-width: 1.2;
  cursor: pointer;
}

.v2-product-layer.is-exterior .v2-sash {
  stroke-width: 1;
}

.v2-product-layer.is-exterior .v2-sash.is-exterior-psk {
  stroke-width: .9;
}

.v2-internal-mullion {
  fill: var(--v2-profile-fill, var(--v2-profile-color, #fff));
  stroke: #1f2937;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.v2-glass {
  fill: #c9deea;
  stroke: #334155;
  stroke-width: 1;
  cursor: pointer;
}

.v2-glazing-bead {
  stroke: var(--v2-bead-color, #d5dde5);
  stroke-width: .8;
  stroke-linecap: square;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.v2-section:hover .v2-glass,
.v2-section:focus .v2-glass {
  fill: #d8ebf5;
  stroke: var(--brand);
}

.v2-opening-line {
  fill: none;
  stroke: #7b8a99;
  stroke-width: 1.35;
  stroke-dasharray: 7 4;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.v2-fix-mark {
  stroke: #6f7d8b;
  stroke-width: 1.15;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.v2-slide-arrow {
  fill: none;
  stroke: #374151;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.v2-slide-rail {
  fill: none;
  stroke: #52606d;
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.v2-slide-track-block {
  fill: #d5e1e8;
  stroke: #52606d;
  stroke-width: .8;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.v2-psk-bottom-cover {
  fill: #c7d1d9;
  stroke: #52606d;
  stroke-width: .8;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.v2-handle {
  fill: var(--v2-handle-color, #ffffff);
  stroke: #5e6b78;
  stroke-width: .75;
  pointer-events: none;
}

.v2-handle-back,
.v2-handle-stem {
  fill: var(--v2-handle-color, #ffffff);
}

.v2-handle-stem {
  stroke: #4f5c68;
}

.v2-handle-tip {
  fill: none;
  stroke: #2f3b49;
  stroke-width: .8;
}

.v2-edit-hint {
  opacity: .82;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}

.v2-edit-hint__badge {
  fill: rgba(255, 255, 255, .86);
  stroke: rgba(37, 99, 235, .52);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.v2-edit-hint__gear-center {
  fill: #ffffff;
  stroke: #2563eb;
  stroke-width: .7;
  vector-effect: non-scaling-stroke;
}

.v2-edit-hint__gear-outline {
  fill: #2d8df0;
  stroke: #2563eb;
  stroke-width: .75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.v2-section:hover .v2-edit-hint,
.v2-section:focus .v2-edit-hint {
  opacity: 1;
}

.v2-dim-line {
  stroke: #aac4d3;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.v2-joint-cap {
  stroke: var(--v2-joint-cap-color, #c8d2dc);
  stroke-width: .75;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.v2-arrow-fill {
  fill: #aac4d3;
}

.v2-dimension-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.v2-dim-input {
  position: absolute;
  width: 54px;
  height: 24px;
  border: 1px solid #c6dbe6;
  border-radius: 3px;
  background: rgba(255, 255, 255, .86);
  color: #182235;
  font: 700 .76rem/1 "Roboto Condensed", "Nunito", sans-serif;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  box-shadow: 0 3px 8px rgba(31, 41, 55, .035);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.v2-dim-input:focus {
  outline: 0;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
}

.v2-dim-input.is-vertical {
  transform: translate(-50%, -50%) rotate(-90deg);
}

.v2-selected-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.v2-selected-summary > div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fbfd;
}

.v2-selected-summary strong {
  display: block;
  margin-top: 2px;
  font-size: .86rem;
  line-height: 1.25;
}

.v2-selected-extras {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.v2-selected-chip {
  width: 84px;
  display: grid;
  grid-template-rows: 60px minmax(22px, auto);
  justify-items: center;
  align-items: start;
  gap: 3px;
}

.v2-selected-chip__media {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f8fbfd;
  color: var(--muted);
  overflow: hidden;
  font-size: .66rem;
  font-weight: 900;
}

.v2-selected-chip__media.is-extra {
  border-radius: 50%;
  background: #fff;
}

.v2-selected-chip__media img {
  width: 100%;
  height: 100%;
  padding: 5px;
  object-fit: contain;
}

.v2-selected-chip__media.is-extra img {
  width: auto;
  height: auto;
  max-width: 72%;
  max-height: 72%;
  padding: 0;
}

.v2-selected-chip__media.is-texture img {
  padding: 0;
  object-fit: cover;
}

.v2-selected-chip em {
  max-width: 82px;
  min-height: 22px;
  color: var(--muted);
  font-style: normal;
  font-size: .6rem;
  line-height: 1.05;
  text-align: center;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.v2-opening-popover {
  position: absolute;
  z-index: 30;
  width: 218px;
  padding: 10px;
  border: 1px solid #c9d8e3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(31, 41, 55, .18);
}

.v2-opening-popover__title {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.v2-opening-popover button {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8fbfd;
  color: var(--ink);
  font-weight: 900;
}

.v2-opening-popover button[data-opening-choice]::before {
  content: "";
  width: 34px;
  height: 28px;
  flex: 0 0 34px;
  border: 1px solid #d9e3ec;
  border-radius: 4px;
  background-color: #fff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 30px 24px;
}

.v2-opening-popover button::after {
  margin-left: auto;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
}

.v2-opening-popover button[data-opening-choice="FIX"]::before {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 40 32' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='8' y='4' width='24' height='24' fill='%23d7e8f1' stroke='%23202c3a' stroke-width='1.5'/%3E%3Cpath d='M17 13l6 6m0-6l-6 6' fill='none' stroke='%237b8a99' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.v2-opening-popover button[data-opening-choice="R"][data-hinge="left"]::before {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 40 32' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='8' y='4' width='24' height='24' fill='%23d7e8f1' stroke='%23202c3a' stroke-width='1.5'/%3E%3Cpath d='M8 4l24 12L8 28' fill='none' stroke='%237b8a99' stroke-width='1.4' stroke-linecap='round'/%3E%3Crect x='30' y='14' width='2' height='5' rx='1' fill='%237b8a99'/%3E%3C/svg%3E");
}

.v2-opening-popover button[data-opening-choice="R"][data-hinge="right"]::before {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 40 32' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='8' y='4' width='24' height='24' fill='%23d7e8f1' stroke='%23202c3a' stroke-width='1.5'/%3E%3Cpath d='M32 4L8 16l24 12' fill='none' stroke='%237b8a99' stroke-width='1.4' stroke-linecap='round'/%3E%3Crect x='8' y='14' width='2' height='5' rx='1' fill='%237b8a99'/%3E%3C/svg%3E");
}

.v2-opening-popover button[data-opening-choice="RU"][data-hinge="left"]::before {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 40 32' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='8' y='4' width='24' height='24' fill='%23d7e8f1' stroke='%23202c3a' stroke-width='1.5'/%3E%3Cpath d='M8 4l24 12L8 28M8 28L20 4l12 24' fill='none' stroke='%237b8a99' stroke-width='1.25' stroke-linecap='round' stroke-dasharray='3 2'/%3E%3Crect x='30' y='14' width='2' height='5' rx='1' fill='%237b8a99'/%3E%3C/svg%3E");
}

.v2-opening-popover button[data-opening-choice="RU"][data-hinge="right"]::before {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 40 32' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='8' y='4' width='24' height='24' fill='%23d7e8f1' stroke='%23202c3a' stroke-width='1.5'/%3E%3Cpath d='M32 4L8 16l24 12M8 28L20 4l12 24' fill='none' stroke='%237b8a99' stroke-width='1.25' stroke-linecap='round' stroke-dasharray='3 2'/%3E%3Crect x='8' y='14' width='2' height='5' rx='1' fill='%237b8a99'/%3E%3C/svg%3E");
}

.v2-opening-popover button[data-opening-choice="U"]::before {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 40 32' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='8' y='4' width='24' height='24' fill='%23d7e8f1' stroke='%23202c3a' stroke-width='1.5'/%3E%3Cpath d='M8 28L20 4l12 24' fill='none' stroke='%237b8a99' stroke-width='1.4' stroke-linecap='round'/%3E%3Crect x='18' y='5' width='5' height='2' rx='1' fill='%237b8a99'/%3E%3C/svg%3E");
}

.v2-opening-popover button[data-opening-choice="PSK"]::before {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 40 32' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='6' y='4' width='28' height='24' fill='none' stroke='%23202c3a' stroke-width='1.5'/%3E%3Crect x='8' y='6' width='12' height='20' fill='%23d7e8f1' stroke='%23202c3a' stroke-width='1.2'/%3E%3Crect x='20' y='6' width='12' height='20' fill='%23d7e8f1' stroke='%23202c3a' stroke-width='1.2'/%3E%3Cpath d='M14 16h10m-4-4l4 4-4 4' fill='none' stroke='%237b8a99' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.v2-opening-popover button[data-opening-choice="FIX"]::after {
  content: "glucha";
}

.v2-opening-popover button[data-opening-choice="R"]::after {
  content: "rozwierna";
}

.v2-opening-popover button[data-opening-choice="RU"]::after {
  content: "rozw.-uch.";
}

.v2-opening-popover button[data-hinge="left"]::after {
  content: "lewa";
}

.v2-opening-popover button[data-hinge="right"]::after {
  content: "prawa";
}

.v2-opening-popover button[data-opening-choice="U"]::after {
  content: "uchylna";
}

.v2-opening-popover button[data-opening-choice="PSK"]::after {
  content: "przesuwna";
}

.v2-opening-popover button.is-active {
  border-color: var(--brand);
  background: #eef5ff;
  color: var(--brand);
}

.admin-profile-diagnostics {
  border: 1px solid #dbe5ef;
  border-radius: 10px;
  padding: 16px;
  background: #f8fbff;
}

.admin-profile-diagnostics > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.admin-profile-diagnostics strong {
  font-size: 1rem;
}

.admin-profile-diagnostics p {
  margin: 0;
  color: var(--muted);
  font-size: .875rem;
}

.admin-profile-diagnostics__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.admin-profile-diagnostics__grid div {
  min-width: 0;
  border: 1px solid #e1e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.admin-profile-diagnostics__grid span,
.admin-profile-diagnostics__grid small {
  display: block;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.25;
}

.admin-profile-diagnostics__grid b {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.35;
  white-space: nowrap;
}

.admin-profile-diagnostics__grid .admin-profile-diagnostics__total {
  grid-column: 4;
  border-color: rgba(37, 99, 235, .35);
  background: #eef5ff;
  text-align: right;
}

.admin-profile-diagnostics__grid .admin-profile-diagnostics__total b {
  color: var(--brand);
  font-size: 1.05rem;
}

.admin-profile-diagnostics__grid .admin-profile-diagnostics__total.is-error {
  border-color: rgba(220, 38, 38, .24);
  background: #fff5f5;
}

@media (max-width: 992px) {
  .v2-calculator {
    grid-template-columns: 1fr;
  }
  .v2-preview-card {
    order: -1;
  }
}

@media (max-width: 640px) {
  .v2-panel,
  .v2-preview-card {
    padding: 14px;
  }
  .v2-control-grid,
  .v2-template-grid,
  .v2-additional-grid,
  .v2-selected-summary {
    grid-template-columns: 1fr;
  }
  .v2-preview-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .v2-preview-actions {
    width: 100%;
  }
  .v2-preview-actions .btn {
    flex: 1 1 auto;
  }
  .v2-action-row {
    flex-direction: column;
  }
  .v2-add-button {
    width: 100%;
  }
  .v2-drawing-wrap {
    height: clamp(280px, var(--preview-image-height), 430px);
  }
}
