/* (c) Quote Builder. All rights reserved. */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 20
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px
}

.brand .logo {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #11151C;
  font-size: 15px
}

.brand b {
  font-size: 16px
}

.brand span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500
}

.auth-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px
}

.auth-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 360px;
  text-align: center
}

.auth-card .alogo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #11151C;
  font-size: 18px;
  margin: 0 auto 14px
}

.auth-card h2 {
  margin: 0 0 4px;
  font-size: 18px
}

.auth-card .sub {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 18px
}

.auth-card input {
  text-align: left;
  margin-bottom: 10px
}

.auth-card .arow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px
}

.auth-card .btn {
  width: 100%;
  justify-content: center
}

.authmsg {
  font-size: 12px;
  color: var(--orange-soft);
  margin-top: 12px;
  min-height: 16px;
  line-height: 1.4
}

.specs {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.5;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px
}

.specs b {
  color: var(--text)
}

#userEmail {
  font-size: 11px;
  color: var(--muted);
  align-self: center
}

@media (max-width:560px) {
  #userEmail {
    display: none
  }
}

.logobox {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px
}

.logobox img {
  height: 46px;
  max-width: 140px;
  object-fit: contain;
  background: #231F20;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px
}

.logobtns {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1
}

.logobtns .add {
  margin-top: 0;
  padding: 7px;
  font-size: 12px
}

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

.brandmodes button {
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 9px 6px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600
}

.brandmodes button.on {
  background: var(--orange);
  border-color: var(--orange);
  color: #11151C
}

.logoinfo {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.4
}

.chk {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  margin: 2px 0 8px
}

.chk input {
  width: auto;
  margin: 0
}

.ie-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px
}

.ie-row .ie {
  margin-top: 0
}

.qlist {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel2)
}

.qrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  cursor: pointer
}

.qrow:last-child {
  border-bottom: none
}

.qrow:hover {
  background: #1f2630
}

.qrow .qmain {
  flex: 1;
  min-width: 0
}

.qrow .qcl {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.qrow .qsub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px
}

.qrow .qtot {
  font-size: 13px;
  font-weight: 700;
  color: var(--orange-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap
}

.qrow .qdel {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0
}

.qrow .qdel:hover {
  border-color: #E5484D;
  color: #E5484D
}

.qempty {
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 12px
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w, 400px) 6px 1fr;
  min-height: calc(100vh - 69px)
}

.form {
  padding: 20px 22px 54px;
  overflow-y: auto;
  max-height: calc(100vh - 69px)
}

.resizer {
  position: relative;
  cursor: col-resize;
  background: var(--line);
  max-height: calc(100vh - 69px)
}

.resizer:hover,
.resizer.dragging {
  background: var(--doc-orange, #FF6A1A)
}

.resizer::after {
  /* invisible wider hit-area so the thin 6px bar is still easy to grab */
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -4px;
  right: -4px
}

.preview-wrap {
  padding: 28px;
  overflow: auto;
  display: flex;
  justify-content: center;
  background: #070A0E
}

.group {
  margin-bottom: 22px
}

.group h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--orange);
  margin: 0 0 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between
}

label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 4px;
  font-weight: 500
}

input,
textarea,
select {
  width: 100%;
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 9px 11px;
  border-radius: 7px;
  font-size: 13px;
  font-family: inherit;
  margin-bottom: 11px
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--orange)
}

textarea {
  resize: vertical;
  min-height: 64px
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px
}

.row3 {
  display: grid;
  grid-template-columns: 20px 1fr 44px 62px 62px 26px;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px
}

.row3 .drag {
  cursor: grab;
  color: var(--muted);
  text-align: center;
  font-size: 15px;
  user-select: none;
  line-height: 1
}

.row3.dragging {
  opacity: .45
}

.row3.over {
  outline: 2px dashed var(--orange);
  outline-offset: 2px;
  border-radius: 6px
}

.row3 input {
  margin-bottom: 0
}

.item-head {
  display: grid;
  grid-template-columns: 20px 1fr 44px 62px 62px 26px;
  gap: 6px;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 6px;
  padding: 0 2px
}

.del {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
  height: 34px;
  font-size: 15px;
  line-height: 1
}

.del:hover {
  border-color: #E5484D;
  color: #E5484D
}

.add {
  width: 100%;
  background: transparent;
  border: 1px dashed var(--line);
  color: var(--muted);
  padding: 9px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px
}

.add:hover {
  border-color: var(--orange);
  color: var(--orange)
}

.hint {
  font-size: 11px;
  color: var(--muted);
  margin: -6px 0 12px
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px
}

.chip {
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: .12s
}

.chip:hover {
  border-color: var(--orange-soft)
}

.chip.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #11151C
}

.pick {
  max-height: 230px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel2)
}

.pick-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  font-size: 13px
}

.pick-row:last-child {
  border-bottom: none
}

.pick-row .nm {
  flex: 1;
  line-height: 1.3
}

.pnote {
  font-size: 11px;
  color: var(--orange-soft);
  margin-top: 3px;
  line-height: 1.3;
  opacity: .9
}

.pick-row .pr {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 12px
}

.pick-row .pl {
  background: var(--orange);
  color: #11151C;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1
}

.pick-row .pl.ok {
  background: #1E9E5A;
  color: #fff
}

.pick-cat {
  font-size: 10px;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 7px 11px 4px;
  background: var(--panel);
  border-bottom: 1px solid var(--line)
}

.pick-empty {
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
  text-align: center
}

.mgr-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 12px 0 6px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line)
}

.mgr-cat.tog {
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  padding: 8px 6px;
  background: rgba(255, 255, 255, .03);
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center
}

.mgr-cat.tog:hover {
  background: rgba(255, 255, 255, .07)
}

.mgr-cat:first-child {
  margin-top: 0
}

.pick-empty {
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 12px
}

.mgr-toggle {
  background: transparent;
  border: none;
  color: var(--orange);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .5px;
  text-transform: uppercase
}

.mgr {
  display: none;
  margin-top: 6px
}

.mgr.open {
  display: block
}

.sub-lbl {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 14px 0 8px
}

.cat-row {
  display: grid;
  grid-template-columns: 1fr 58px 28px;
  gap: 6px;
  align-items: center;
  margin-bottom: 7px
}

.cat-row input,
.cat-row select {
  margin-bottom: 0
}

.mgr-row {
  display: grid;
  grid-template-columns: 1fr 56px 56px 1fr 26px;
  gap: 6px;
  align-items: center;
  margin-bottom: 7px
}

.mgr-item {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px;
  margin-bottom: 9px;
  background: var(--panel2)
}

.mgr-item .mgr-row {
  margin-bottom: 7px
}

.mgr-sub {
  display: flex;
  gap: 6px;
  align-items: center
}

.mgr-sub input[type=number] {
  width: 92px;
  flex: none;
  margin-bottom: 0 !important;
  font-size: 12px
}

.mgr-sub .mgr-note {
  flex: 1
}

.row3.autoinst input[data-f=price] {
  border-color: var(--orange);
  background: rgba(255, 106, 26, .12)
}

.mgr-note {
  margin-bottom: 0 !important;
  font-size: 12px;
  background: var(--panel) !important
}

.profit {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #15233A, #161B22);
  padding: 14px;
  margin-top: 6px
}

.profit.hidden-body .pbody {
  display: none
}

.profit .ptop {
  display: flex;
  align-items: center;
  justify-content: space-between
}

.profit .plock {
  font-size: 11px;
  color: var(--orange);
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase
}

.profit .ptoggle {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600
}

.profit .ptoggle:hover {
  border-color: var(--orange);
  color: var(--orange)
}

.profit .pbody {
  margin-top: 12px
}

.prow {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .05)
}

.prow:last-of-type {
  border-bottom: none
}

.prow .v {
  font-weight: 700;
  font-variant-numeric: tabular-nums
}

.prow.profit-v .v {
  color: #37D67A
}

.prow.vat-v .v {
  color: var(--orange-soft)
}

.vatmode {
  display: flex;
  gap: 6px;
  margin: 10px 0 4px
}

.vatmode button {
  flex: 1;
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 7px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600
}

.vatmode button.on {
  background: var(--orange);
  border-color: var(--orange);
  color: #11151C
}

.mgr-row input,
.mgr-row select {
  margin-bottom: 0;
  padding: 7px 8px;
  font-size: 12px
}

.backup {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px
}

.backup button {
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600
}

.backup button:hover {
  border-color: var(--orange);
  color: var(--orange)
}

#quote,
#quote * {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important
}

.pm-back {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px
}

.pm-back.open {
  display: flex
}

.pm-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  width: 100%;
  max-width: 420px;
  max-height: 92vh;
  overflow: auto
}

.pm-box h4 {
  margin: 0 0 12px;
  font-size: 16px
}

.pm-box label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0 4px
}

.pm-box input,
.pm-box select {
  width: 100%;
  margin: 0
}

.pm-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px
}

.pm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px
}

.colorrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 4px 0 6px
}

.colorrow input[type=color] {
  padding: 2px;
  height: 38px;
  cursor: pointer;
  margin-bottom: 0
}

#quote {
  width: 794px;
  min-height: 1120px;
  background: #fff;
  color: var(--doc-text);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
  flex-shrink: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  display: flex;
  flex-direction: column
}

.q-head {
  background: var(--doc-dark);
  color: var(--doc-head-text, #fff);
  padding: 34px 44px 26px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start
}

.q-logo {
  display: flex;
  align-items: center;
  gap: 14px
}

.q-logo .mark {
  width: 54px;
  height: 54px;
  border-radius: 11px;
  background: var(--doc-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #11151C;
  font-size: 20px
}

.q-logo .t1 {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1
}

#p-brandtext {
  font-size: 24px;
  font-weight: 800;
  color: var(--doc-head-text, #fff);
  letter-spacing: .5px;
  line-height: 1.15;
  max-width: 320px
}

.q-logo .t2 {
  font-size: 12px;
  color: var(--doc-head-sub, #9FB0C0);
  font-weight: 500;
  margin-top: 3px
}

.q-meta {
  text-align: right
}

.q-meta .title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--doc-orange)
}

.q-meta .subtype {
  font-size: 11px;
  color: var(--doc-head-sub, #9FB0C0);
  font-weight: 600;
  margin-top: 3px;
  letter-spacing: .5px;
  text-transform: uppercase
}

.q-meta table {
  margin-top: 12px;
  margin-left: auto;
  font-size: 12px;
  border-collapse: collapse
}

.q-meta td {
  padding: 2px 0
}

.q-meta td:first-child {
  color: var(--doc-head-sub, #9FB0C0);
  text-align: right;
  padding-right: 12px
}

.q-meta td:last-child {
  font-weight: 600;
  text-align: right
}

.q-accent {
  height: 4px;
  background: var(--doc-orange)
}

.q-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 30px 44px 8px
}

.q-parties .lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--doc-orange);
  font-weight: 700;
  margin-bottom: 8px
}

.q-parties .name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px
}

.q-parties .det {
  font-size: 12px;
  color: var(--doc-grey);
  line-height: 1.7;
  white-space: pre-line
}

.q-body {
  padding: 22px 44px;
  flex: 1
}

table.items {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px
}

table.items thead th {
  background: var(--doc-dark);
  color: var(--doc-head-text, #fff);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 11px
}

table.items thead th.num {
  text-align: right
}

table.items tbody td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--doc-line);
  vertical-align: top
}

table.items tbody td.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums
}

table.items tbody tr:nth-child(even) {
  background: #FAFBFC
}

.q-desc {
  font-weight: 600;
  color: var(--doc-text)
}

.totals {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px
}

.totals table {
  font-size: 13px;
  min-width: 280px;
  border-collapse: collapse
}

.totals td {
  padding: 6px 12px
}

.totals td:first-child {
  color: var(--doc-grey)
}

.totals td:last-child {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums
}

.totals tr.grand td {
  background: var(--doc-dark);
  color: var(--doc-head-text, #fff);
  font-size: 15px;
  font-weight: 800;
  padding: 11px 12px
}

.totals tr.grand td:first-child {
  color: var(--doc-head-text, #fff)
}

.totals tr.disc td:last-child {
  color: #1E9E5A
}

.q-notes {
  padding: 6px 44px 24px
}

.q-notes .lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--doc-orange);
  font-weight: 700;
  margin-bottom: 6px
}

.q-notes .body {
  font-size: 11.5px;
  color: var(--doc-text);
  line-height: 1.7;
  white-space: pre-line
}

.q-pay {
  padding: 0 44px 22px
}

.q-pay .lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--doc-orange);
  font-weight: 700;
  margin-bottom: 6px
}

.q-pay .box {
  border: 1px solid var(--doc-line);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 11.5px;
  color: var(--doc-grey);
  line-height: 1.8
}

.q-pay .payrow {
  display: flex;
  gap: 10px
}

.q-pay .payrow span {
  min-width: 130px;
  opacity: .8
}

.q-pay .payrow b {
  color: var(--doc-dark);
  font-weight: 700;
  word-break: break-all
}

.q-foot {
  border-top: 2px solid var(--doc-line);
  padding: 18px 44px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--doc-grey)
}

.q-foot .thanks {
  font-weight: 700;
  color: var(--doc-text);
  font-size: 13px
}

@media screen {
  .quote-fit {
    position: relative;
    margin: 0 auto
  }

  #quote {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left
  }
}

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

  .resizer {
    display: none
  }

  .form {
    border-right: none;
    border-bottom: 1px solid var(--line);
    max-height: none
  }

  .preview-wrap {
    padding: 14px
  }

  input,
  textarea,
  select {
    font-size: 16px
  }
}

@media (max-width:560px) {
  .topbar {
    flex-wrap: wrap;
    gap: 10px
  }

  .brand span {
    display: none
  }

  .btn {
    padding: 10px 13px;
    font-size: 13px
  }

  .form {
    padding: 16px 14px
  }

  .row3,
  .item-head {
    grid-template-columns: 18px 1fr 40px 56px 56px 24px;
    gap: 5px
  }

  .mgr-row {
    grid-template-columns: 1fr 52px 52px 1fr 24px;
    gap: 5px
  }
}

@media print {
  @page {
    size: A4;
    margin: 0
  }

  body {
    background: #fff
  }

  .topbar,
  .form {
    display: none !important
  }

  .layout {
    display: block;
    min-height: 0
  }

  .preview-wrap {
    padding: 0;
    background: #fff;
    display: block;
    overflow: visible
  }

  .quote-fit {
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important
  }

  #quote {
    position: static !important;
    width: 794px;
    min-height: auto;
    margin: 0 auto !important;
    box-shadow: none !important;
    transform: none !important
  }

  table.items tbody tr,
  .q-foot,
  .totals {
    break-inside: avoid
  }
}

.qrow.cur { border-color: var(--orange) }
.editbar { font-size: 12px; color: var(--orange-soft); margin: 8px 0 0; line-height: 1.5; display: none }
.editbar button { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 3px 8px; font-size: 11px; cursor: pointer; margin-left: 6px }
.mkc, .mkh { display: none }
#items.mk-on .mkc, .item-head.mk-on .mkh { display: block }
#items.mk-on .row3, .item-head.mk-on { grid-template-columns: 18px 1fr 40px 56px 56px 46px 24px }
.row3 input.mkc.ov { border-color: var(--orange); background: rgba(255, 106, 26, .12) }
.mkchips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 6px 0 }
.mkchips button { padding: 8px 0; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); cursor: pointer; font-size: 13px }
.mkchips button.on { border-color: var(--orange); color: var(--orange) }
.os-tot { font-size: 14px; font-weight: 700; margin: 4px 0 }
.os-cl { display: flex; justify-content: space-between; font-weight: 700; font-size: 13px; margin-top: 10px }
.os-inv { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; margin-top: 4px; cursor: pointer }
.os-inv.od { border-color: var(--orange) }
.os-inv .od-t { color: var(--orange) }
.rcrow { display: none }
.totals tr.rem td { font-weight: 700; color: var(--doc-dark); border-top: 2px solid var(--doc-line) }
.totals tr.rem td:first-child { color: var(--doc-dark) }
.totals tr.rem.paid td { color: #1E9E5A }
#mkRound { width: 100%; background: var(--panel2); border: 1px solid var(--line); color: var(--text); padding: 10px; border-radius: 8px; font-size: 13px; margin-bottom: 8px }
#rcInv { width: 100%; background: var(--panel2); border: 1px solid var(--line); color: var(--text); padding: 10px; border-radius: 8px; font-size: 13px; margin-bottom: 8px }
.rc-sum { font-size: 12px; color: var(--muted); margin: 4px 0 8px; line-height: 1.5 }
.rc-pay { display: flex; justify-content: space-between; align-items: center; font-size: 12px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 4px }
.rc-pay button { background: none; border: none; color: var(--orange); cursor: pointer; font-size: 16px }

.linkbtn { background: none; border: 0; color: var(--orange-soft); cursor: pointer; font-size: 12px; margin-top: 10px; padding: 4px 6px }
.linkbtn:hover { text-decoration: underline }

/* hide the (empty) app until we know if the user is signed in */
body.booting .topbar, body.booting .layout { visibility: hidden }

/* bottom tabs: "Terms & Conditions" / "Contact us" — normal document flow,
   sitting at the true bottom of the page (not a floating/fixed overlay) */
.bottom-tabs {
  position: static;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 10px 16px;
  background: var(--panel);
  border-top: 1px solid var(--line)
}

.bottom-tabs button {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 6px
}

.bottom-tabs button:hover {
  color: var(--orange);
  background: var(--panel2)
}

/* ===== Subscription (14-day free trial, then Monthly/Yearly) ===== */
.sub-banner {
  background: var(--panel2);
  border-bottom: 1px solid var(--line);
  padding: 8px 22px;
  font-size: 12.5px;
  color: var(--orange-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  text-align: center
}

.sub-banner.warn {
  color: #FF9E80;
  background: #2A1810
}

.sub-banner button {
  background: var(--orange);
  color: #11151C;
  border: none;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  flex-shrink: 0
}

.sub-plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px
}

.sub-plan-row b {
  font-size: 14px
}

#subCheckoutContainer {
  min-height: 420px
}

/* Read-only mode: subscription/trial has ended. Everything inside .form
   is disabled except the three groups marked .ro-allow (Outstanding
   payments, Invoices & receipts history, Saved quotes list) — which only
   let the person VIEW their existing quotes/invoices/receipts, never
   create or edit anything (catalogue and products included). */
body.read-only .form > .group:not(.ro-allow) {
  opacity: .45;
  pointer-events: none;
  filter: grayscale(.25)
}

body.read-only #newQ,
body.read-only #dl {
  display: none
}

body.read-only #grpSavedQuotes #saveQuote {
  opacity: .4;
  pointer-events: none
}
