:root {
  --invoice-dark-brown: #8a705d;
  --invoice-dark-grey: #4b4a48;
  --invoice-bg: #fffdfb;
  --invoice-surface: #fffefd;
  --invoice-border: #dec3b3;
  --v2-surface-border-width: 1.5px;
  --v2-form-control-border-width: 1px;
  --v2-form-control-border: #dec3b3;
  --invoice-text: var(--invoice-dark-grey);
  --invoice-accent-text: var(--invoice-dark-brown);
  --invoice-muted: #a39186;
  --invoice-fill: #f5eee8;
  --invoice-soft-surface: #f6efeb;
  --invoice-blue: #5c9ee8;
  --invoice-pink: #ff808c;
  --invoice-green: #30b86b;
  --invoice-error-bg: #fff6f7;
  --invoice-error-border: #f4a8b3;
  --invoice-error-text: #f19799;
  --invoice-error-fill: #fee7ea;
  --invoice-success-border: #9fddbd;
  --invoice-success-text: #63BF90;
  --invoice-success-fill: #E8FAF1;
}

.v2-content {
  background: #ffffff;
}

.v2-invoice-entry-page {
  width: 100%;
  max-width: 1510px;
  margin: 0 auto;
  padding: 14px 18px 36px;
  background: #ffffff !important;
  background-image: none !important;
  color: var(--invoice-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.v2-invoice-entry-page * {
  box-sizing: border-box;
}

.v2-invoice-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}

.v2-invoice-form-column {
  min-width: 0;
}

.v2-invoice-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 220px;
  overflow: hidden;
}

.v2-invoice-title-block {
  position: relative;
  z-index: 1;
  width: 36%;
  padding: 8px 20px 12px;
  transform: translateY(-42px);
}

.v2-invoice-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.v2-invoice-title-row h1 {
  margin: 0;
  color: var(--invoice-dark-brown);
  font-size: 24px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.1;
  white-space: nowrap;
}

.v2-invoice-title-block p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 7px 0 0;
  color: var(--invoice-accent-text);
  font-size: 16px;
}

.v2-title-sakura {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.v2-invoice-hero-art {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 72%;
  height: 220px;
  object-fit: contain;
  object-position: right bottom;
}

.v2-invoice-section,
.v2-invoice-side-card,
.v2-invoice-action-card {
  border: var(--v2-surface-border-width) solid var(--invoice-border);
  border-radius: 16px;
  background: rgba(255, 254, 253, 0.95);
}

.v2-invoice-section {
  margin-bottom: 16px;
  padding: 20px 20px 18px;
}

.v2-invoice-section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.v2-section-number {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  border: var(--v2-surface-border-width) solid var(--invoice-border);
  border-radius: 50%;
  background: var(--invoice-soft-surface);
  font-size: 15px;
  font-weight: 600;
}

.v2-invoice-section-heading h2,
.v2-invoice-side-card h2 {
  margin: 0;
  color: var(--invoice-accent-text);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: 0;
}

.v2-customer-section-grid {
  display: grid;
  grid-template-columns: minmax(330px, 1fr) minmax(320px, 0.96fr);
  gap: clamp(40px, 8vw, 90px);
}

.v2-field-title,
.v2-invoice-field > span:first-child {
  display: block;
  margin-bottom: 7px;
  color: var(--invoice-accent-text);
  font-size: 13px;
  font-style: normal;
  font-weight: 650;
}

.v2-invoice-field em,
.v2-field-title em {
  margin-left: 8px;
  color: #aaa09b;
  font-style: normal;
  font-weight: 400;
}

.v2-invoice-control {
  width: 100%;
  height: 40px;
  border: var(--v2-form-control-border-width) solid var(--v2-form-control-border);
  border-radius: 12px;
  outline: none;
  background: #fffefd;
  color: var(--invoice-dark-grey);
  font: 400 14px/1 Inter, system-ui, sans-serif;
  letter-spacing: 0;
  text-align: left;
}

.v2-invoice-control,
.v2-custom-select-trigger,
.v2-live-date-shell,
.v2-flexible-date-shell {
  border-color: var(--v2-form-control-border);
}

.v2-invoice-entry-page input.v2-invoice-control,
.v2-invoice-entry-page select.v2-invoice-control,
.v2-invoice-entry-page textarea.v2-invoice-control,
.v2-invoice-entry-page .v2-custom-select-trigger,
.v2-invoice-entry-page .v2-live-date-shell,
.v2-invoice-entry-page .v2-flexible-date-shell {
  border-color: var(--v2-form-control-border) !important;
  background-color: #fffefd !important;
}

input.v2-invoice-control,
textarea.v2-invoice-control {
  padding: 0 12px;
}

.v2-invoice-control::placeholder {
  color: #b3aeaa;
}

.v2-customer-select {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 4px 12px;
}

.v2-customer-select > svg,
.v2-select-wrap > svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.v2-customer-avatar {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: #f7dce6;
  color: #a77584;
  font-size: 13px;
}

.v2-contact-card {
  position: relative;
  display: grid;
  gap: 15px;
  min-height: 140px;
  margin-top: 12px;
  padding: 21px 20px;
  overflow: hidden;
  border: var(--v2-surface-border-width) solid var(--invoice-border);
  border-radius: 13px;
  background: #fcfaf7;
}

.v2-contact-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  color: var(--invoice-dark-grey);
  font-size: 15px;
  line-height: 1.5;
}

.v2-contact-row[hidden] {
  display: none;
}

.v2-contact-symbol {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: start center;
  color: var(--invoice-accent-text);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  align-self: start;
}

.v2-contact-symbol svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.v2-contact-sakura {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.v2-invoice-details-column {
  display: grid;
  grid-template-columns: minmax(0, 220px);
  align-content: start;
  gap: 14px;
}

.v2-reference-field {
  width: min(100%, 370px);
}

.v2-date-control {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
}

.v2-live-date-shell {
  position: relative;
  cursor: pointer;
  background: #fffefd;
}

.v2-date-control svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: var(--invoice-dark-brown);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.v2-live-date-display {
  color: var(--invoice-dark-grey);
  font: 400 15px/1 Inter, system-ui, sans-serif;
  white-space: nowrap;
}

.v2-live-date-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  opacity: 0;
  cursor: pointer;
  appearance: none;
}

.v2-flexible-date-shell {
  position: relative;
  cursor: text;
  background: #fff;
}

.v2-flexible-date-trigger {
  display: grid;
  flex: 0 0 22px;
  width: 22px;
  height: 100%;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--invoice-dark-brown);
  cursor: pointer;
}

.v2-flexible-date-trigger:focus,
.v2-flexible-date-trigger:focus-visible {
  outline: 0;
  box-shadow: none !important;
}

.v2-flexible-date-input {
  min-width: 0;
  flex: 1;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  box-shadow: none !important;
  background: transparent;
  color: var(--invoice-dark-grey);
  font: 400 15px/1 Inter, system-ui, sans-serif;
  letter-spacing: 0;
}

.v2-invoice-entry-page .v2-flexible-date-input,
.v2-invoice-entry-page .v2-flexible-date-input:focus,
.v2-invoice-entry-page .v2-flexible-date-input:focus-visible {
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  background: transparent !important;
  background-color: transparent !important;
}

.v2-flexible-date-input:focus,
.v2-flexible-date-input:focus-visible {
  border: 0;
  outline: 0;
  box-shadow: none !important;
}

.v2-date-popover {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  left: 0;
  width: min(286px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid rgba(138, 112, 93, 0.24);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(91, 72, 59, 0.16);
  color: var(--invoice-dark-brown);
  cursor: default;
}

.v2-date-popover[hidden] {
  display: none;
}

.v2-date-calendar-header,
.v2-date-calendar-nav,
.v2-date-calendar-weekdays,
.v2-date-calendar-grid {
  display: grid;
  align-items: center;
}

.v2-date-calendar-header {
  grid-template-columns: 1fr auto;
  min-height: 34px;
  margin-bottom: 8px;
}

.v2-date-calendar-header strong {
  font-size: 14px;
  font-weight: 600;
}

.v2-date-calendar-nav {
  grid-auto-flow: column;
  gap: 4px;
}

.v2-date-calendar-nav button,
.v2-date-calendar-day {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.v2-date-calendar-nav button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.v2-date-calendar-nav svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.v2-date-calendar-weekdays,
.v2-date-calendar-grid {
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.v2-date-calendar-weekdays {
  margin-bottom: 4px;
  color: #8a837e;
  font-size: 11px;
  text-align: center;
}

.v2-date-calendar-day,
.v2-date-calendar-blank {
  aspect-ratio: 1;
  min-width: 0;
}

.v2-date-calendar-day {
  border-radius: 8px;
  font: 400 13px/1 Inter, system-ui, sans-serif;
}

.v2-date-calendar-nav button:hover,
.v2-date-calendar-day:hover {
  background: #f6efeb;
}

.v2-date-calendar-day.is-today {
  box-shadow: inset 0 0 0 1px #bfaf9d;
}

.v2-date-calendar-day.is-selected {
  border: 1px solid #8a705d;
  background: #ecded6;
  color: #8a705d;
  font-weight: 600;
}

.v2-flexible-date-input::placeholder {
  color: #b3aeaa;
}

.v2-flexible-date-shell:focus-within {
  border-color: #bfaf9d;
  box-shadow: inset 0 0 0 1px #bfaf9d, 0 0 0 3px rgba(191, 175, 157, 0.2);
}

.v2-flexible-date-shell.is-invalid,
.v2-flexible-date-shell:has(.v2-flexible-date-input[aria-invalid="true"]) {
  border-color: var(--invoice-border);
  border-width: 1px;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(244, 168, 179, 0.16), 0 8px 22px rgba(241, 151, 153, 0.12);
}

.v2-items-section {
  padding: 20px 10px 10px;
}

.v2-items-section > .v2-invoice-section-heading {
  padding: 0 10px;
}

.v2-invoice-line-items {
  display: grid;
  gap: 10px;
}

.v2-invoice-line-item {
  padding: 12px 12px 10px;
  border: var(--v2-surface-border-width) solid var(--invoice-border);
  border-radius: 14px;
  background: #fffefd;
}

.v2-line-primary-grid {
  display: grid;
  grid-template-columns: minmax(130px, 1.1fr) minmax(230px, 2.1fr) 60px 120px 92px 32px;
  gap: 12px;
  align-items: start;
  overflow: visible;
}

.v2-line-secondary-grid {
  display: grid;
  grid-template-columns: minmax(130px, 1.1fr) minmax(170px, 1.25fr) minmax(370px, 2.6fr);
  gap: 12px;
  align-items: start;
  margin-top: 12px;
}

.v2-invoice-line-item:has(.v2-line-quantity .v2-live-field-error:not([hidden])) .v2-line-secondary-grid {
  margin-top: 62px;
}

.v2-select-wrap {
  position: relative;
  display: block;
  overflow: visible;
}

.v2-custom-select-wrap {
  isolation: isolate;
}

.v2-custom-select-wrap.is-custom-select-open {
  z-index: 240;
}

.v2-select-wrap select {
  appearance: none;
  padding: 0 34px 0 10px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.v2-select-wrap select:hover {
  background: #fcfaf7;
  box-shadow: 0 8px 18px rgba(138, 112, 93, 0.08);
}

.v2-select-wrap select:focus {
  border-color: #8a705d;
  background: #fcfaf7;
  box-shadow: inset 0 0 0 1px #8a705d, 0 0 0 3px rgba(138, 112, 93, 0.16);
}

.v2-select-wrap select option {
  background: #fffefd;
  color: var(--invoice-dark-grey);
  font-size: 14px;
  font-weight: 400;
}

.v2-select-wrap select option:hover {
  background: #fcfaf7;
}

.v2-select-wrap select option:checked {
  background: #ecded6;
  color: #8a705d;
}

.v2-select-wrap > svg {
  position: absolute;
  top: 50%;
  right: 10px;
  pointer-events: none;
  transform: translateY(-50%);
}

.v2-custom-select-wrap > svg {
  display: none;
}

.v2-native-select-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.v2-custom-select-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  cursor: pointer;
  transition: background-color 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.v2-custom-select-trigger:hover,
.v2-custom-select-trigger:focus {
  border-color: #8a705d;
  background: #fffefd;
  box-shadow: inset 0 0 0 1px #8a705d, 0 0 0 3px rgba(138, 112, 93, 0.14);
}

.v2-custom-select-trigger.is-invalid,
.v2-select-wrap:has(select.is-invalid) .v2-custom-select-trigger {
  border-color: var(--invoice-border);
  border-width: 1px;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(244, 168, 179, 0.16), 0 8px 22px rgba(241, 151, 153, 0.12);
}

.v2-custom-select-trigger:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.v2-custom-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-custom-select-trigger svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 170ms ease;
}

.v2-custom-select-wrap.is-custom-select-open .v2-custom-select-trigger svg {
  transform: rotate(180deg);
}

.v2-custom-select-menu {
  position: absolute;
  z-index: 250;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  max-height: 260px;
  overflow: auto;
  padding: 8px 14px 8px 8px;
  border: var(--v2-form-control-border-width) solid var(--v2-form-control-border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(91, 72, 59, 0.16);
  color: #4b4a48;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 180ms ease, transform 180ms ease;
  scrollbar-color: rgba(138, 112, 93, 0.26) transparent;
  scrollbar-width: auto;
  overscroll-behavior: contain;
}

.v2-custom-select-menu::-webkit-scrollbar {
  width: 18px;
}

.v2-custom-select-menu::-webkit-scrollbar-track {
  margin: 12px 0;
  background: transparent;
}

.v2-custom-select-menu::-webkit-scrollbar-thumb {
  border: 6px solid #ffffff;
  border-radius: 999px;
  background: rgba(138, 112, 93, 0.26);
}

.v2-custom-select-menu::-webkit-scrollbar-button {
  width: 0;
  height: 0;
}

.v2-custom-select-menu[hidden] {
  display: none;
}

.v2-custom-select-wrap.is-custom-select-open .v2-custom-select-menu {
  opacity: 1;
  transform: translateY(0);
}

.v2-custom-select-option {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #4b4a48;
  font: 400 14px/1.25 Inter, system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: background-color 170ms ease, font-weight 170ms ease;
}

.v2-custom-select-option:hover,
.v2-custom-select-option.is-active {
  background: #f6efeb;
}

.v2-custom-select-option.is-selected {
  background: #ecded6;
  color: #4b4a48;
  font-weight: 550;
}

.v2-custom-select-option[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.45;
}

.v2-custom-select-group {
  margin-top: 8px;
  padding: 8px 12px 4px;
  color: #8a705d;
  font: 600 12px/1.2 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
}

.v2-custom-select-group:first-child {
  margin-top: 0;
}

.v2-custom-select-empty {
  padding: 10px 12px;
  color: #8a705d;
  font: 400 14px/1.3 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.v2-line-item-name small,
.v2-line-quantity small {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.2;
}

.v2-line-item-name small {
  color: #a58e7c;
}

.v2-line-quantity small {
  color: var(--invoice-accent-text);
}

.v2-line-quantity {
  position: relative;
  overflow: visible;
}

.v2-line-quantity .v2-live-field-error {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  z-index: 5;
  width: 270px;
  max-width: calc(100vw - 48px);
}

.v2-line-delete {
  display: grid;
  width: 32px;
  height: 40px;
  align-self: start;
  place-items: center;
  margin-top: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--invoice-accent-text);
  transition: background-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.v2-line-delete:hover,
.v2-line-delete:focus-visible {
  border-radius: 10px;
  background: #fffefd;
  box-shadow: 0 8px 22px rgba(138, 112, 93, 0.14), 0 0 0 4px rgba(222, 195, 179, 0.22);
}

.v2-line-delete svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.v2-line-calculation {
  display: grid;
  grid-template-columns: minmax(125px, 1fr) 18px minmax(125px, 1fr) 18px minmax(135px, 1fr);
  gap: 3px;
  align-items: start;
}

.v2-line-amount {
  display: grid;
  grid-template-rows: 16px 40px;
  gap: 7px;
}

.v2-line-amount span {
  color: var(--invoice-accent-text);
  font-size: 13px;
  font-weight: 650;
  line-height: 16px;
}

.v2-line-amount strong {
  display: flex;
  min-width: 0;
  height: 40px;
  align-items: center;
  transform: translateY(3px);
  color: #6f6965;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.v2-line-amount.is-total strong {
  color: var(--invoice-accent-text);
  font-size: 14px;
  font-weight: 700;
}

.v2-line-amount strong.is-negative,
.v2-line-amount.is-total strong.is-negative {
  color: var(--invoice-pink);
}

.v2-line-operator {
  display: grid;
  height: 40px;
  align-self: end;
  place-items: center;
  transform: translateY(3px);
  padding: 0;
  color: var(--invoice-accent-text);
  font-size: 15px;
  font-weight: 700;
}

.v2-line-plus {
  color: var(--invoice-green);
}

.v2-line-price input[type="number"],
.v2-line-discount input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.v2-line-price input[type="number"]::-webkit-inner-spin-button,
.v2-line-price input[type="number"]::-webkit-outer-spin-button,
.v2-line-discount input[type="number"]::-webkit-inner-spin-button,
.v2-line-discount input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.v2-add-item-button {
  display: flex;
  width: 100%;
  height: 34px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 13px;
  border: 0;
  border-radius: 18px;
  background: #eadbd0;
  color: var(--invoice-accent-text);
  font-size: 14px;
  font-weight: 650;
  transition: background-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.v2-add-item-button:hover,
.v2-add-item-button:focus-visible {
  box-shadow: 0 8px 22px rgba(138, 112, 93, 0.14), 0 0 0 4px rgba(222, 195, 179, 0.22);
}

.v2-add-item-button > span:first-child {
  display: inline-flex;
  align-items: center;
}

.v2-add-item-button > svg {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.v2-more-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(240px, 0.9fr);
  gap: clamp(40px, 9vw, 120px);
  align-items: start;
}

.v2-notes-wrap {
  position: relative;
  display: block;
}

.v2-notes-field textarea {
  min-height: 82px;
  padding: 13px 14px;
  resize: vertical;
  line-height: 1.4;
}

.v2-notes-sakura {
  position: absolute;
  right: 10px;
  bottom: 8px;
  width: 36px;
  height: 36px;
}

.v2-attachment-field {
  padding-top: 1px;
}

.v2-attach-button {
  display: inline-flex;
  min-width: 190px;
  height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: var(--v2-form-control-border-width) solid var(--v2-form-control-border);
  border-radius: 10px;
  background: var(--invoice-soft-surface);
  color: var(--invoice-accent-text);
  font-size: 14px;
  font-weight: 650;
  transition: background-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.v2-attach-button:hover,
.v2-attach-button:focus-visible {
  box-shadow: 0 8px 22px rgba(138, 112, 93, 0.14), 0 0 0 4px rgba(222, 195, 179, 0.22);
}

.v2-attach-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.v2-attachment-field p {
  margin: 8px 0 0;
  color: #aaa29d;
  font-size: 12px;
}

.v2-invoice-right-panel {
  position: sticky;
  top: calc(var(--v2-topbar-height) + 14px);
  display: grid;
  gap: 14px;
}

.v2-invoice-side-card {
  padding: 15px 16px;
}

.v2-invoice-side-card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.v2-invoice-side-card h2 svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: var(--invoice-accent-text);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.v2-invoice-summary-card h2.is-compact-title {
  gap: 8px;
  font-size: 17px;
  white-space: nowrap;
}

.v2-invoice-summary-card h2.is-compact-title svg {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
}

.v2-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  margin: 0 0 15px;
  color: var(--invoice-dark-grey);
  font-size: 14px;
}

.v2-summary-row strong {
  color: var(--invoice-dark-grey);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.v2-summary-row strong.is-negative {
  color: var(--invoice-pink);
}

.v2-summary-divider {
  margin: 3px 0 17px;
  border-top: 1px dashed #d9c4b7;
}

.v2-summary-row.is-total {
  align-items: center;
  margin-bottom: 0;
  color: var(--invoice-accent-text);
  font-size: 19px;
  font-weight: 700;
}

.v2-summary-row.is-total strong {
  color: var(--invoice-accent-text);
  font-size: 19px;
  font-weight: 700;
}

.v2-summary-row.is-total strong.is-negative {
  color: var(--invoice-pink);
}

.v2-invoice-club-card h2 {
  margin-bottom: 8px;
  font-size: 19px;
}

.v2-invoice-club-card h2 svg {
  width: 26px;
  height: 26px;
}

.v2-invoice-club-card p {
  margin: 0;
  color: var(--invoice-dark-grey);
  font-size: 14px;
  line-height: 1.45;
}

.v2-invoice-club-card p br {
  display: block;
  margin-top: 20px;
  content: "";
}

.v2-invoice-club-art {
  display: block;
  width: 100%;
  height: 118px;
  margin: 8px auto 4px;
  object-fit: contain;
}

.v2-invoice-club-button {
  display: flex;
  width: 165px;
  height: 30px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 auto;
  border: 0;
  border-radius: 9px;
  background: #eadbd0;
  color: var(--invoice-accent-text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.v2-invoice-club-button:hover,
.v2-invoice-club-button:focus-visible {
  box-shadow: 0 8px 22px rgba(138, 112, 93, 0.14), 0 0 0 4px rgba(222, 195, 179, 0.22);
}

.v2-invoice-club-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.v2-invoice-action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 4px;
  padding: 19px 20px;
}

.v2-invoice-action {
  display: flex;
  width: auto;
  min-height: 0;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 27px;
  border: var(--v2-surface-border-width) solid var(--invoice-border);
  border-radius: 10px;
  background: #fffefd;
  color: var(--invoice-accent-text);
  font-size: 16px;
  font-weight: 650;
  transition: background-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.v2-invoice-action:hover,
.v2-invoice-action:focus-visible {
  box-shadow: 0 8px 22px rgba(138, 112, 93, 0.14), 0 0 0 4px rgba(222, 195, 179, 0.22);
}

.v2-attention-glow {
  animation: v2-attention-glow 2s ease;
}

@keyframes v2-attention-glow {
  0%,
  100% {
    box-shadow: 0 8px 22px rgba(138, 112, 93, 0.14), 0 0 0 0 rgba(222, 195, 179, 0);
  }

  12%,
  82% {
    box-shadow: 0 10px 26px rgba(138, 112, 93, 0.18), 0 0 0 4px rgba(222, 195, 179, 0.36);
  }
}

.v2-invoice-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.v2-action-section-heading {
  margin: 0;
}

.v2-action-section-heading h2 {
  margin: 0;
  color: var(--invoice-accent-text);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0;
}

.v2-action-section-sakura {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  object-fit: contain;
}

.v2-action-button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 20px;
}

.v2-transaction-action-panel .v2-action-draft {
  background: var(--invoice-soft-surface);
}

.v2-action-preview {
  border-color: #7db4f0;
  background: #f4faff;
  color: #4e91dc;
}

.v2-action-send,
.v2-action-primary {
  border-color: #e2cdbf;
  background: #e8d8cd;
  color: var(--invoice-accent-text);
  font-size: 16px;
  font-weight: 650;
}

.v2-invoice-action.v2-action-primary svg {
  width: 18px;
  height: 18px;
}

.v2-toast-preview-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding: 10px;
  border: 1px solid #e5d6ce;
  border-radius: 17px;
  background: #fcfaf7;
  box-shadow: 0 0 0 3px #f6efeb, 0 14px 34px rgba(138, 112, 93, 0.12);
}

.v2-toast-preview-panel button {
  border: 1px solid #dec3b3;
  border-radius: 12px;
  background: #f6efeb;
  color: #8a705d;
  cursor: pointer;
  font: 600 12px/1.2 Inter, system-ui, sans-serif;
  padding: 8px 10px;
}

button,
a,
select {
  cursor: pointer;
}

/* Keep the transaction form's labels, headings and action icons on one calm accent. */
.v2-invoice-entry-page .v2-section-number,
.v2-invoice-entry-page .v2-line-amount span,
.v2-invoice-entry-page .v2-invoice-club-card h2,
.v2-invoice-entry-page .v2-invoice-summary-card h2,
.v2-invoice-entry-page .v2-action-draft,
.v2-invoice-entry-page .v2-action-send,
.v2-invoice-entry-page .v2-action-primary {
  color: var(--invoice-accent-text);
}

@media (max-width: 1250px) {
  .v2-invoice-entry-page {
    padding-inline: 14px;
  }

  .v2-invoice-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 14px;
  }

  .v2-customer-section-grid {
    gap: 36px;
  }

  .v2-line-primary-grid {
    grid-template-columns: minmax(120px, 1fr) minmax(180px, 1.8fr) 54px 104px 82px 30px;
    gap: 8px;
  }

  .v2-line-secondary-grid {
    grid-template-columns: minmax(120px, 1fr) minmax(145px, 1.2fr) minmax(330px, 2.4fr);
    gap: 8px;
  }
}

@media (max-width: 1050px) {
  .v2-invoice-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .v2-invoice-right-panel {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  .v2-invoice-action-card {
    align-content: center;
  }
}

@media (max-width: 820px) {
  .v2-invoice-entry-page {
    padding: 12px 10px 28px;
  }

  .v2-invoice-hero {
    grid-template-columns: 1fr;
  }

  .v2-invoice-hero-art {
    height: 100px;
  }

  .v2-customer-section-grid,
  .v2-more-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .v2-invoice-action-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .v2-action-button-row {
    width: 100%;
    justify-content: flex-start;
  }

  .v2-invoice-details-column {
    grid-template-columns: 1fr 1fr;
  }

  .v2-reference-field {
    grid-column: 1 / -1;
  }

  .v2-line-primary-grid {
    grid-template-columns: 1fr 1.6fr 70px;
  }

  .v2-line-price,
  .v2-line-discount {
    grid-column: span 1;
  }

  .v2-line-delete {
    grid-column: 3;
    grid-row: 2;
    margin-top: 0;
  }

  .v2-line-secondary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .v2-line-calculation {
    grid-column: 1 / -1;
  }

  .v2-invoice-right-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .v2-invoice-section {
    padding: 16px 12px;
  }

  .v2-invoice-details-column,
  .v2-line-primary-grid,
  .v2-line-secondary-grid {
    grid-template-columns: 1fr;
  }

  .v2-reference-field,
  .v2-line-delete,
  .v2-line-calculation {
    grid-column: 1;
  }

  .v2-line-delete {
    grid-row: auto;
    justify-self: end;
    margin-top: 0;
  }

  .v2-line-calculation {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .v2-line-operator {
    display: none;
  }
}
.v2-invoice-title-accent {
  color: #ff808c;
}

.v2-live-field-error {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--invoice-error-text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.v2-validation-inline-icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  place-items: center;
  margin-top: 0;
  border-radius: 999px;
  background: var(--invoice-error-fill);
  color: var(--invoice-error-text);
}

.v2-validation-inline-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.v2-live-form-error {
  position: sticky;
  left: auto;
  right: auto;
  bottom: 12px;
  z-index: 120;
  display: flex;
  width: 100%;
  max-width: 100%;
  min-height: 64px;
  align-items: center;
  gap: 24px;
  margin-top: 16px;
  margin-inline: 0;
  padding: 10px 38px 10px 24px;
  border: 2px solid #e4d7cc;
  border-radius: 999px;
  background: #fcfaf7;
  box-shadow: 0 0 0 4px var(--invoice-error-fill), 0 18px 48px rgba(138, 112, 93, 0.14);
  color: #8a705d;
}

.v2-invoice-entry-page:has(.v2-live-form-error:not([hidden])) {
  padding-bottom: 36px;
}

.v2-live-form-error.is-success {
  border-color: #e4d7cc;
  box-shadow: 0 0 0 4px var(--invoice-success-fill), 0 18px 48px rgba(138, 112, 93, 0.14);
}

.v2-validation-bar-status {
  display: grid;
  flex: 0 0 auto;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 999px;
  background: var(--invoice-error-fill);
  color: var(--invoice-error-text);
}

.v2-live-form-error.is-success .v2-validation-bar-status,
.v2-validation-bar-next.is-success {
  background: var(--invoice-success-fill);
  color: var(--invoice-success-text);
}

.v2-invoice-entry-page .v2-validation-bar-status > svg {
  width: 34px;
  height: 34px;
  stroke-width: 1;
}

.v2-validation-bar-copy {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 2px;
  text-align: left;
}

.v2-validation-bar-copy strong,
.v2-validation-bar-copy span,
.v2-validation-bar-count {
  color: #8a705d;
  font-size: 16px;
  line-height: 1.2;
}

.v2-validation-bar-copy strong {
  font-weight: 600;
}

.v2-validation-bar-copy span {
  font-weight: 400;
}

.v2-validation-bar-count {
  flex: 0 0 auto;
  margin-left: 34px;
  font-weight: 400;
  white-space: nowrap;
}

.v2-validation-bar-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 21px;
  margin-left: 29px;
}

.v2-validation-bar-control {
  appearance: none;
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #b8a79b;
  cursor: pointer;
  font: inherit;
  padding: 0;
  transition: box-shadow 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.v2-validation-bar-control:hover {
  box-shadow: 0 8px 20px rgba(138, 112, 93, 0.14);
  transform: translateY(-1px);
}

.v2-validation-bar-control:focus-visible {
  outline: 2px solid rgba(138, 112, 93, 0.35);
  outline-offset: 2px;
}

.v2-validation-bar-next {
  background: var(--invoice-error-fill);
  color: var(--invoice-error-text);
}

.v2-validation-bar-prev {
  background: #f6efeb;
}

.v2-validation-bar-close {
  background: transparent;
}

.v2-validation-bar-control svg {
  width: 30px;
  height: 30px;
  stroke-width: 2;
}

.v2-live-form-error[hidden],
.v2-live-field-error[hidden],
[data-stock-helper][hidden] {
  display: none !important;
}

.v2-invoice-control.is-invalid {
  border-color: var(--v2-form-control-border);
  border-width: var(--v2-form-control-border-width);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(244, 168, 179, 0.16), 0 8px 22px rgba(241, 151, 153, 0.12);
}

.v2-live-date-shell.is-invalid {
  border-color: var(--v2-form-control-border);
  border-width: var(--v2-form-control-border-width);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(244, 168, 179, 0.16), 0 8px 22px rgba(241, 151, 153, 0.12);
}

.v2-live-customer-select,
.v2-live-date-input {
  padding: 0 12px;
  color: var(--v2-brown, #8a705d);
  font: 400 14px/1 Inter, system-ui, sans-serif;
}

.v2-customer-select-wrap {
  width: 100%;
}

.v2-customer-select-wrap .v2-live-field-error {
  margin-top: 8px;
  margin-bottom: 14px;
}

.v2-customer-select-wrap:has(.v2-live-field-error:not([hidden])) + .v2-contact-card {
  margin-top: 2px;
}

.v2-invoice-entry-page.is-live-loading .v2-invoice-line-items {
  opacity: 0.55;
}

.v2-invoice-entry-page.is-live-loading select,
.v2-invoice-action:disabled {
  cursor: wait;
  opacity: 0.65;
}

@media (max-width: 720px) {
  .v2-live-form-error {
    bottom: 0;
    width: 100%;
    min-height: 0;
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 10px 16px;
    border-radius: 26px;
  }

  .v2-validation-bar-count,
  .v2-validation-bar-controls {
    margin-left: 0;
  }
}
