.mkc-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  max-width: 980px;
  margin: 20px auto;
  font-family: system-ui, -apple-system, Segoe UI, Roboto;
  color: #1e293b; }
  .mkc-wrap *:focus-visible {
    outline: 3px solid #1d4ed8;
    outline-offset: 2px; }
  .mkc-wrap .mkc-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px; }
    .mkc-wrap .mkc-head .mkc-title {
      font-size: 1.25rem;
      font-weight: 700;
      margin: 0;
      color: #0f172a; }
  .mkc-wrap .mkc-head-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px; }
  .mkc-wrap .mkc-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    color: #334155;
    cursor: pointer;
    min-height: 44px; }
    .mkc-wrap .mkc-filter-toggle input {
      width: 18px;
      height: 18px; }
  .mkc-wrap .mkc-badge {
    background: #eef2ff;
    color: #3730a3;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: .8rem; }
  .mkc-wrap .mkc-save-status {
    min-height: 1.2em;
    margin: 0 0 8px;
    font-size: .9rem; }
  .mkc-wrap .mkc-save-status-success {
    color: #166534; }
  .mkc-wrap .mkc-save-status-error {
    color: #b91c1c; }
  .mkc-wrap .mkc-autosave-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 0 0 12px;
    font-size: .88rem; }
    .mkc-wrap .mkc-autosave-banner[hidden] {
      display: none; }
  .mkc-wrap .mkc-autosave-clear {
    border: 1px solid #93c5fd;
    background: #fff;
    color: #1e3a8a;
    border-radius: 6px;
    padding: 6px 12px;
    min-height: 36px;
    font-size: .82rem;
    cursor: pointer;
    white-space: nowrap; }
  .mkc-wrap .mkc-params {
    position: sticky;
    top: var(--wp-admin--admin-bar--height, 0px);
    z-index: 15;
    background: #fff;
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    align-items: flex-end;
    margin: 0 0 14px;
    padding: 12px 0 14px;
    border-bottom: 1px solid #e2e8f0; }
  .mkc-wrap .mkc-field {
    display: flex;
    flex-direction: column;
    gap: 4px; }
    .mkc-wrap .mkc-field label,
    .mkc-wrap .mkc-field .mkc-field-label {
      font-size: .78rem;
      font-weight: 600;
      color: #475569; }
    .mkc-wrap .mkc-field input {
      max-width: 140px;
      min-height: 44px;
      padding: 6px 10px;
      border: 1px solid #cbd5e1;
      border-radius: 6px;
      font-size: 1rem; }
  .mkc-wrap .mkc-field-static .mkc-field-value {
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: 1rem; }
    .mkc-wrap .mkc-field-static .mkc-field-value strong {
      margin-right: 4px; }
  .mkc-wrap .mkc-field-profit {
    margin-left: auto; }
  .mkc-wrap .mkc-segmented {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden; }
  .mkc-wrap .mkc-segment {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 12px;
    min-height: 44px;
    min-width: 84px;
    cursor: pointer;
    border-right: 1px solid #cbd5e1;
    background: #fff; }
    .mkc-wrap .mkc-segment:last-child {
      border-right: none; }
    .mkc-wrap .mkc-segment input {
      position: absolute;
      opacity: 0;
      width: 1px;
      height: 1px; }
    .mkc-wrap .mkc-segment .mkc-segment-amount {
      font-weight: 700;
      font-size: .95rem;
      color: #1e293b; }
    .mkc-wrap .mkc-segment .mkc-segment-desc {
      font-size: .68rem;
      color: #475569;
      text-align: center;
      line-height: 1.2; }
    .mkc-wrap .mkc-segment:has(input:checked) {
      background: #3730a3; }
      .mkc-wrap .mkc-segment:has(input:checked) .mkc-segment-amount,
      .mkc-wrap .mkc-segment:has(input:checked) .mkc-segment-desc {
        color: #fff; }
    .mkc-wrap .mkc-segment:has(input:focus-visible) {
      outline: 3px solid #3730a3;
      outline-offset: -3px; }
  .mkc-wrap .mkc-category {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin: 0 0 10px;
    overflow: hidden; }
    .mkc-wrap .mkc-category[open] .mkc-category-chevron {
      transform: rotate(45deg); }
  .mkc-wrap .mkc-category-summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    min-height: 44px;
    background: #f8fafc;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer; }
    .mkc-wrap .mkc-category-summary::-webkit-details-marker {
      display: none; }
    .mkc-wrap .mkc-category-summary::marker {
      content: ''; }
  .mkc-wrap .mkc-category-name {
    flex: 1 1 auto; }
  .mkc-wrap .mkc-category-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 400;
    font-size: .85rem;
    color: #475569;
    font-variant-numeric: tabular-nums; }
  .mkc-wrap .mkc-category-subtotal {
    font-weight: 700;
    color: #0f172a; }
  .mkc-wrap .mkc-category-chevron {
    width: 10px;
    height: 10px;
    border-right: 2px solid #475569;
    border-bottom: 2px solid #475569;
    transform: rotate(225deg);
    transition: transform .15s ease;
    flex: 0 0 auto; }
  .mkc-wrap .mkc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0; }
    .mkc-wrap .mkc-table th,
    .mkc-wrap .mkc-table td {
      padding: 14px 10px;
      border-bottom: 1px solid #f1f5f9;
      text-align: left;
      vertical-align: middle; }
    .mkc-wrap .mkc-table thead th {
      font-size: .82rem;
      color: #475569; }
    .mkc-wrap .mkc-table th.mkc-right,
    .mkc-wrap .mkc-table td.mkc-right {
      text-align: right;
      font-variant-numeric: tabular-nums; }
    .mkc-wrap .mkc-table tr {
      display: table-row; }
    .mkc-wrap .mkc-table tr[data-row].mkc-row-selected {
      background: #eff6ff;
      box-shadow: inset 3px 0 0 #1d4ed8; }
    .mkc-wrap .mkc-table .mkc-subtotal {
      padding: 20px 10px; }
    .mkc-wrap .mkc-table .mkc-cat {
      background: #f8fafc;
      font-weight: 700; }
    .mkc-wrap .mkc-table .mkc-product {
      display: flex;
      align-items: center;
      gap: 10px; }
    .mkc-wrap .mkc-table .mkc-product-name a {
      font-size: 14px;
      color: #1e293b; }
    .mkc-wrap .mkc-table .mkc-product-thumb {
      width: 56px;
      height: 56px;
      flex: 0 0 auto;
      -o-object-fit: cover;
         object-fit: cover;
      border-radius: 6px;
      background: #f1f5f9; }
    .mkc-wrap .mkc-table .mkc-product-thumb-placeholder {
      display: block;
      background-color: #f1f5f9;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: center;
      background-size: 26px 26px; }
    .mkc-wrap .mkc-table select.mkc-variant {
      width: 100%;
      min-height: 44px; }
    .mkc-wrap .mkc-table .mkc-variant-static {
      color: #475569; }
  .mkc-wrap .mkc-auto-badge-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px; }
  .mkc-wrap .mkc-auto-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    min-height: 32px; }
    .mkc-wrap .mkc-auto-badge input {
      width: 18px;
      height: 18px; }
    .mkc-wrap .mkc-auto-badge .mkc-auto-badge-text {
      background: #eef2ff;
      color: #3730a3;
      border-radius: 999px;
      padding: 3px 9px;
      font-size: .72rem;
      font-weight: 700;
      letter-spacing: .02em; }
    .mkc-wrap .mkc-auto-badge.mkc-auto-badge-secondary .mkc-auto-badge-text {
      background: #f1f5f9;
      color: #334155; }
  .mkc-wrap .mkc-qty-control {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden; }
  .mkc-wrap .mkc-qty-step {
    width: 36px;
    min-height: 44px;
    border: none;
    background: #f8fafc;
    color: #1e293b;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer; }
    .mkc-wrap .mkc-qty-step:hover {
      background: #e2e8f0; }
  .mkc-wrap .mkc-qty {
    width: 56px;
    min-height: 44px;
    border: none;
    border-left: 1px solid #cbd5e1;
    border-right: 1px solid #cbd5e1;
    text-align: center;
    font-size: 1rem;
    -moz-appearance: textfield; }
    .mkc-wrap .mkc-qty::-webkit-outer-spin-button, .mkc-wrap .mkc-qty::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0; }
  .mkc-wrap .mkc-qty-unit {
    display: inline-block;
    margin-left: 6px;
    font-size: .82rem;
    color: #475569; }
  .mkc-wrap .mkc-sticky {
    padding: 16px 0 0; }
  .mkc-wrap .mkc-extra {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    background: #f8fafc; }
    .mkc-wrap .mkc-extra .mkc-extra-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      margin-bottom: 8px; }
    .mkc-wrap .mkc-extra .mkc-extra-help {
      margin: 0 0 10px;
      font-size: .85rem;
      color: #475569; }
    .mkc-wrap .mkc-extra .mkc-extra-list {
      display: flex;
      flex-direction: column;
      gap: 8px; }
    .mkc-wrap .mkc-extra .mkc-extra-item {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px; }
      .mkc-wrap .mkc-extra .mkc-extra-item input[type='text'] {
        flex: 1 1 220px;
        min-width: 180px;
        min-height: 44px; }
      .mkc-wrap .mkc-extra .mkc-extra-item input[type='number'] {
        width: 150px;
        min-height: 44px; }
      .mkc-wrap .mkc-extra .mkc-extra-item .mkc-extra-remove {
        border: none;
        background: transparent;
        color: #c2410c;
        cursor: pointer;
        padding: 6px;
        min-width: 44px;
        min-height: 44px;
        line-height: 1; }
  .mkc-wrap .mkc-extra-output {
    display: flex;
    flex-direction: column;
    gap: 6px; }
  .mkc-wrap .mkc-footer-tables {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 520px);
    align-items: start;
    gap: 20px;
    margin-top: 10px; }
  .mkc-wrap .mkc-cost-internal,
  .mkc-wrap .mkc-cost-client {
    display: flex;
    flex-direction: column;
    gap: 14px; }
  .mkc-wrap .mkc-summary-title {
    margin: 0;
    font-size: .95rem;
    color: #0f172a; }
  .mkc-wrap .mkc-summary-table {
    width: 100%;
    max-width: none;
    border-collapse: collapse; }
    .mkc-wrap .mkc-summary-table td {
      padding: 5px 0;
      border: none;
      font-variant-numeric: tabular-nums; }
    .mkc-wrap .mkc-summary-table .mkc-right {
      text-align: right; }
    .mkc-wrap .mkc-summary-table .mkc-grand-total-row td {
      padding-top: 12px;
      border-top: 2px solid #e2e8f0; }
  .mkc-wrap .mkc-grand-value {
    font-size: 1.1rem; }
  .mkc-wrap .mkc-estimate-wrap {
    width: 100%;
    background: #050505;
    color: #f8fafc;
    border: 1px solid #1e293b;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22); }
    .mkc-wrap .mkc-estimate-wrap .mkc-estimate-title {
      margin: 0 0 8px;
      font-size: .95rem;
      color: #e2e8f0; }
    .mkc-wrap .mkc-estimate-wrap .mkc-summary-table td {
      color: #e2e8f0; }
    .mkc-wrap .mkc-estimate-wrap .mkc-summary-table strong {
      color: #f8fafc; }
    .mkc-wrap .mkc-estimate-wrap .mkc-summary-table .mkc-grand-total-row td {
      border-top: 2px solid #334155; }
  .mkc-wrap .mkc-estimate-total {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap; }
  .mkc-wrap .mkc-copy-btn {
    border: 1px solid #475569;
    background: #111827;
    color: #f8fafc;
    border-radius: 999px;
    padding: 4px 10px;
    min-height: 32px;
    font-size: .72rem;
    line-height: 1.6;
    cursor: pointer; }
  .mkc-wrap .mkc-overview-wrap {
    width: 100%;
    background: #fff;
    border: 1px solid #1e293b;
    border-top: 4px solid #1e293b;
    border-radius: 12px;
    padding: 14px 16px; }
    .mkc-wrap .mkc-overview-wrap .mkc-estimate-title {
      margin: 0 0 10px;
      color: #0f172a; }
    .mkc-wrap .mkc-overview-wrap .mkc-overview-table {
      max-width: 100%; }
      .mkc-wrap .mkc-overview-wrap .mkc-overview-table thead th {
        padding: 0 0 8px;
        font-size: .8rem;
        color: #475569;
        border-bottom: 1px solid #e2e8f0; }
      .mkc-wrap .mkc-overview-wrap .mkc-overview-table tbody td {
        padding: 8px 0;
        border-bottom: 1px solid #f1f5f9; }
    .mkc-wrap .mkc-overview-wrap .mkc-overview-actions {
      display: flex;
      justify-content: flex-end;
      margin-top: 12px; }
  .mkc-wrap .mkc-overview-actions {
    flex-wrap: wrap;
    gap: 8px; }
    .mkc-wrap .mkc-overview-actions .button {
      min-height: 44px; }
  .mkc-wrap .mkc-billit-customer {
    border-top: 1px solid #e2e8f0;
    margin-top: 14px;
    padding-top: 14px; }
    .mkc-wrap .mkc-billit-customer h5 {
      margin: 0 0 4px;
      font-size: .95rem;
      color: #0f172a; }
  .mkc-wrap .mkc-billit-required-note {
    margin: 0 0 12px;
    font-size: .78rem;
    color: #475569; }
  .mkc-wrap .mkc-billit-group {
    border: none;
    padding: 0;
    margin: 0 0 14px; }
    .mkc-wrap .mkc-billit-group legend {
      font-size: .78rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .03em;
      color: #475569;
      padding: 0 0 6px; }
  .mkc-wrap .mkc-billit-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px; }
    .mkc-wrap .mkc-billit-grid label {
      display: flex;
      flex-direction: column;
      gap: 4px;
      font-size: .82rem;
      color: #334155;
      position: relative; }
    .mkc-wrap .mkc-billit-grid input {
      width: 100%;
      min-height: 44px;
      padding: 4px 8px;
      border: 1px solid #cbd5e1;
      border-radius: 6px; }
    .mkc-wrap .mkc-billit-grid label:nth-child(1),
    .mkc-wrap .mkc-billit-grid label:nth-child(2) {
      grid-column: span 2; }
  .mkc-wrap .mkc-billit-group:last-of-type .mkc-billit-grid label:nth-child(1) {
    grid-column: span 2; }
  .mkc-wrap .mkc-field-error {
    color: #b91c1c;
    font-size: .76rem;
    min-height: 1em; }
  .mkc-wrap .mkc-field-invalid input {
    border-color: #b91c1c; }
  .mkc-wrap .mkc-billit-message {
    margin-top: 10px;
    font-size: .9rem; }
  .mkc-wrap .mkc-billit-message-success {
    color: #166534; }
  .mkc-wrap .mkc-billit-message-error {
    color: #b91c1c; }
  .mkc-wrap .mkc-billit-message-warning {
    color: #92400e; }
  .mkc-wrap .mkc-billit-message-info {
    color: #1d4ed8; }

.mkc-wrap.mkc-filter-active tr[data-row]:not(.mkc-row-selected) {
  display: none; }

.mkc-total-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 100%;
  border: none;
  border-top: 1px solid #1e293b;
  background: #0f172a;
  color: #fff;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  min-height: 56px;
  cursor: pointer;
  font-family: inherit; }
  .mkc-total-bar .mkc-total-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.25; }
  .mkc-total-bar .mkc-total-bar-label {
    font-size: .68rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .03em; }
  .mkc-total-bar .mkc-total-bar-value {
    font-size: .95rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums; }
  .mkc-total-bar .mkc-total-bar-item-grand .mkc-total-bar-value {
    font-size: 1.05rem;
    color: #93c5fd; }
  .mkc-total-bar .mkc-total-bar-value.mkc-flash {
    animation: mkc-flash-value .7s ease; }

@keyframes mkc-flash-value {
  0% {
    background-color: rgba(147, 197, 253, 0.55); }
  100% {
    background-color: transparent; } }

@media (max-width: 900px) {
  .mkc-wrap .mkc-footer-tables {
    grid-template-columns: 1fr; }
  .mkc-wrap .mkc-billit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mkc-wrap .mkc-billit-grid label:nth-child(1),
  .mkc-wrap .mkc-billit-grid label:nth-child(2) {
    grid-column: span 1; } }

@media (max-width: 768px) {
  .mkc-wrap .mkc-params {
    top: 0; }
  .mkc-wrap .mkc-field-profit {
    margin-left: 0;
    width: 100%; }
  .mkc-wrap .mkc-segmented {
    width: 100%; }
  .mkc-wrap .mkc-segment {
    flex: 1 1 auto; }
  .mkc-wrap .mkc-table thead {
    display: none; }
  .mkc-wrap .mkc-table tbody,
  .mkc-wrap .mkc-table tr[data-row] {
    display: block; }
  .mkc-wrap .mkc-table tr[data-row] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "product product" "variant variant" "price   auto" "qty     sub";
    gap: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    margin: 0 0 10px; }
    .mkc-wrap .mkc-table tr[data-row].mkc-row-selected {
      box-shadow: none;
      border-left: 3px solid #1d4ed8;
      background: #eff6ff; }
  .mkc-wrap .mkc-table td {
    border-bottom: none;
    padding: 2px 0; }
  .mkc-wrap .mkc-table td.mkc-product {
    grid-area: product;
    align-items: flex-start;
    display: flex; }
  .mkc-wrap .mkc-table td.mkc-col-variant {
    grid-area: variant; }
  .mkc-wrap .mkc-table td.mkc-col-price {
    grid-area: price;
    text-align: left; }
  .mkc-wrap .mkc-table td.mkc-col-auto {
    grid-area: auto; }
  .mkc-wrap .mkc-table td.mkc-col-qty {
    grid-area: qty;
    display: flex;
    align-items: center;
    gap: 8px; }
  .mkc-wrap .mkc-table td.mkc-col-sub {
    grid-area: sub;
    font-weight: 700; }
  .mkc-wrap .mkc-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: .68rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .02em; }
  .mkc-wrap .mkc-table td.mkc-product::before,
  .mkc-wrap .mkc-table td.mkc-col-qty::before {
    display: none; }
  .mkc-wrap .mkc-category-meta {
    gap: 8px;
    font-size: .78rem; }
  .mkc-total-bar {
    gap: 14px;
    justify-content: space-between; }
  .mkc-total-bar .mkc-total-bar-label {
    font-size: .62rem; }
  .mkc-total-bar .mkc-total-bar-value {
    font-size: .85rem; }
  .mkc-total-bar .mkc-total-bar-item-grand .mkc-total-bar-value {
    font-size: .95rem; } }

@media (max-width: 560px) {
  .mkc-wrap .mkc-billit-grid {
    grid-template-columns: 1fr; }
  .mkc-wrap .mkc-billit-grid label {
    grid-column: auto !important; }
  .mkc-wrap .mkc-head-actions {
    width: 100%;
    justify-content: flex-start; } }

body.mkc-hide-chrome .nav-primary,
body.mkc-hide-chrome .nav-mobile-menu,
body.mkc-hide-chrome footer {
  display: none !important; }
