/* Brenova OS application styles extracted from runtime JavaScript. */

/* Canonical AppCore surfaces */
#role-chooser-modal button.is-selected{border-color:#7c4a31;background:#fff8f2;box-shadow:0 8px 24px rgba(73,48,35,.08)}
#role-chooser-modal button:not(.is-selected){border-color:#f2f2f2;background:#fff;box-shadow:0 8px 24px rgba(40,32,28,.045)}




/* Role/navigation compatibility */


















      .brenova-v80-hidden{display:none!important;visibility:hidden!important;pointer-events:none!important;}

/* Internal chat */
.br-chat-overlay{position:fixed;inset:0;z-index:99980;background:rgba(15,23,42,.52);backdrop-filter:blur(7px);display:flex;align-items:flex-end;justify-content:center;padding:10px;direction:rtl;font-family:Vazirmatn,system-ui,sans-serif}
      .br-chat-panel{width:min(100%,620px);height:min(88vh,780px);background:#f8fafc;border:1px solid rgba(255,255,255,.85);border-radius:28px 28px 18px 18px;box-shadow:0 30px 90px rgba(15,23,42,.30);overflow:hidden;display:flex;flex-direction:column}
      .br-chat-header{background:#fff;padding:15px 17px;border-bottom:1px solid #e2e8f0;display:flex;align-items:center;gap:10px;min-height:68px}
      .br-chat-title{font-size:14px;font-weight:900;color:#0f172a;flex:1}.br-chat-sub{font-size:10px;font-weight:700;color:var(--br-text-muted);margin-top:3px}
      .br-chat-iconbtn{width:38px;height:38px;border:1px solid #e2e8f0;border-radius:14px;background:#fff;color:#475569;display:flex;align-items:center;justify-content:center;cursor:pointer}
      .br-chat-body{padding:13px;overflow:auto;flex:1}.br-chat-card{background:#fff;border:1px solid #e2e8f0;border-radius:19px;padding:13px;margin-bottom:10px;box-shadow:0 4px 18px rgba(15,23,42,.04)}
      .br-chat-thread{display:flex;align-items:center;gap:11px;cursor:pointer}.br-chat-thread:hover{border-color:#bae6fd}.br-chat-avatar{width:42px;height:42px;border-radius:15px;background:#ecfeff;color:#0e7490;display:flex;align-items:center;justify-content:center;flex:none}
      .br-chat-thread-main{min-width:0;flex:1}.br-chat-peer{font-size:12px;font-weight:900;color:#0f172a}.br-chat-preview{font-size:10px;font-weight:700;color:var(--br-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:5px}.br-chat-time{font-size:9px;color:var(--br-text-soft);font-weight:700;white-space:nowrap}
      .br-chat-dot{width:9px;height:9px;border-radius:99px;background:#f97316;box-shadow:0 0 0 4px #ffedd5;flex:none}.br-chat-empty{text-align:center;padding:48px 20px;color:var(--br-text-soft);font-size:11px;font-weight:800;line-height:2}
      .br-chat-compose{background:linear-gradient(135deg,#ecfeff,#fff);border-color:#a5f3fc}.br-chat-label{display:block;font-size:10px;font-weight:900;color:#334155;margin-bottom:6px}.br-chat-select,.br-chat-textarea{width:100%;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:14px;background:#fff;padding:11px 12px;font:700 11px Vazirmatn,system-ui;outline:none;color:#0f172a}.br-chat-textarea{resize:vertical;min-height:82px;line-height:1.9}.br-chat-select:focus,.br-chat-textarea:focus{border-color:#06b6d4;box-shadow:0 0 0 3px rgba(6,182,212,.10)}
      .br-chat-btn{border:0;border-radius:14px;padding:11px 15px;font:900 11px Vazirmatn,system-ui;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:7px}.br-chat-btn-primary{background:#0e7490;color:#fff}.br-chat-btn-ack{background:#15803d;color:#fff;width:100%;padding:13px}.br-chat-btn-muted{background:#e2e8f0;color:#475569}.br-chat-btn:disabled{opacity:.5;cursor:not-allowed}
      .br-chat-detail{display:flex;flex-direction:column;height:100%}.br-chat-messages{padding:14px;overflow:auto;flex:1;background:radial-gradient(circle at top,#ecfeff 0,#f8fafc 40%)}.br-chat-bubble-row{display:flex;margin:9px 0}.br-chat-bubble-row.mine{justify-content:flex-start}.br-chat-bubble-row.theirs{justify-content:flex-end}.br-chat-bubble{max-width:84%;border-radius:18px;padding:11px 13px;box-shadow:0 4px 14px rgba(15,23,42,.06);font-size:11px;font-weight:700;line-height:2;white-space:pre-wrap;overflow-wrap:anywhere}.mine .br-chat-bubble{background:#0e7490;color:#fff;border-bottom-left-radius:6px}.theirs .br-chat-bubble{background:#fff;color:#1e293b;border:1px solid #e2e8f0;border-bottom-right-radius:6px}.br-chat-meta{font-size:8.5px;font-weight:700;opacity:.75;margin-top:5px;display:flex;gap:7px;align-items:center}.br-chat-footer{background:#fff;border-top:1px solid #e2e8f0;padding:12px}.br-chat-notice{font-size:10px;font-weight:800;color:#92400e;background:#fffbeb;border:1px solid #fde68a;border-radius:13px;padding:10px;line-height:1.8;margin-bottom:9px}.br-chat-actions{display:flex;gap:8px;align-items:flex-end}.br-chat-actions .br-chat-textarea{min-height:58px;max-height:120px;flex:1}.br-chat-send-small{width:48px;height:48px;padding:0;flex:none}
      #brenova-internal-chat-badge{position:absolute;top:-5px;right:-5px;min-width:17px;height:17px;padding:0 4px;border-radius:99px;background:#dc2626;color:#fff;border:2px solid #fff;font-size:8px;font-weight:900;display:none;align-items:center;justify-content:center}
      @media(min-width:700px){.br-chat-overlay{align-items:center}.br-chat-panel{border-radius:28px;height:min(82vh,760px)}}

/* Area filter */
[data-area-tab-selected="1"]{background:#2C1E16!important;color:#fff!important;box-shadow:0 8px 20px rgba(44,30,22,.16)!important;border-color:transparent!important}






/* Admin workflow */
#admin-customer-ops-v153{display:none!important}.v154-console{border-radius:2rem;padding:1rem;background:rgba(255,255,255,.84);border:1px solid rgba(255,255,255,.85)}.v154-head{display:flex;justify-content:space-between;gap:.75rem;align-items:flex-start}.v154-head p{margin:0;color:#f97316;font-size:9px;font-weight:950;letter-spacing:.12em}.v154-head h3{margin:.2rem 0;color:#2C1E16;font-size:16px;font-weight:950}.v154-head button{width:40px;height:40px;border:0;border-radius:15px;background:#fff;color:#5d4037;cursor:pointer}.v154-form,.v154-assign{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.55rem;margin:.8rem 0}.v167-route-form{display:grid;grid-template-columns:2fr repeat(5,minmax(0,1fr));gap:.55rem;margin:.8rem 0}.v167-route-form textarea,.v167-route-form select{width:100%;min-width:0;min-height:46px;border:1px solid rgba(231,229,228,.9);background:#fff;border-radius:15px;padding:.65rem;font-size:10px;font-weight:850;color:#44403c;outline:none;box-sizing:border-box}.v167-route-form textarea{resize:vertical;line-height:1.8}.v166-native-field{display:flex;flex-direction:column;gap:.35rem;min-width:0}.v166-native-field>span{font-size:9px;font-weight:950;color:var(--br-text-muted);padding-inline:.2rem}.v154-form input,.v154-assign select,.v164-native-select{position:relative;z-index:1;display:block;width:100%;min-width:0;min-height:48px;border:1px solid rgba(231,229,228,.9);background:#fff;border-radius:15px;padding:.72rem;font-size:10px;font-weight:850;color:#44403c;outline:none;cursor:text;appearance:auto!important;-webkit-appearance:auto!important;pointer-events:auto!important;touch-action:manipulation;box-sizing:border-box!important}.v154-assign select,.v164-native-select{cursor:pointer;-webkit-appearance:menulist!important;overflow:visible!important;white-space:normal!important}.v154-form input:focus,.v154-assign select:focus{border-color:rgba(255,87,34,.55);box-shadow:0 0 0 4px rgba(255,87,34,.09)}.v154-selected{border-color:rgba(16,185,129,.45)!important;background:#f0fdf4!important}.v154-toggle{position:relative;z-index:1;display:flex;align-items:center;justify-content:center;gap:.45rem;min-height:48px;border:1px solid #fed7aa;background:#fff7ed;color:#c2410c;border-radius:15px;padding:.65rem;font-size:10px;font-weight:950;cursor:pointer;pointer-events:auto!important;touch-action:manipulation;box-sizing:border-box}.v154-toggle input{position:static!important;opacity:1!important;pointer-events:auto!important;width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;max-width:18px!important;accent-color:#f97316;cursor:pointer}.v154-toggle.active{background:#ffedd5;border-color:#fb923c}.v154-primary{border:0;border-radius:15px;background:linear-gradient(135deg,#2C1E16,#c2410c);color:#fff;padding:.78rem;font-size:10px;font-weight:950;box-shadow:0 12px 24px rgba(255,87,34,.18);min-height:48px;cursor:pointer;pointer-events:auto!important}.v168-classify-row{display:flex;align-items:center;justify-content:space-between;gap:.6rem;background:#f8fafc;border:1px solid #e2e8f0;border-radius:18px;padding:.65rem;margin:.7rem 0}.v168-classify-row span{font-size:9px;font-weight:850;color:var(--br-text-muted);line-height:1.8}.v154-primary.disabled{background:#e7e5e4;color:#57534e;box-shadow:none}.v154-console h4{margin:1rem 0 .5rem;color:#2C1E16;font-size:11px;font-weight:950}.v154-list{display:grid;gap:.5rem}.v154-area-row{display:flex;align-items:center;justify-content:space-between;gap:.75rem;background:rgba(255,255,255,.78);border:1px solid rgba(255,255,255,.9);border-radius:18px;padding:.65rem}.v154-area-row b{display:block;color:#2C1E16;font-size:11px;font-weight:950}.v154-area-row span,.v154-area-row small{display:block;color:var(--br-text-muted);font-size:9px;font-weight:800;line-height:1.7}.v154-area-actions{display:flex;gap:.4rem}.v154-area-actions button{border:0;border-radius:13px;background:#f1f5f9;color:#334155;padding:.55rem .65rem;font-size:9px;font-weight:950;cursor:pointer}.v154-area-actions .danger{background:#fff1f2;color:#be123c}.v154-empty{border-radius:16px;background:#f8fafc;color:var(--br-text-muted);border:1px solid #e2e8f0;font-size:10px;font-weight:900;padding:.75rem;text-align:center}@media(max-width:860px){.v154-form,.v154-assign,.v167-route-form{grid-template-columns:1fr}.v154-area-row{align-items:flex-start;flex-direction:column}.v154-area-actions{width:100%}.v154-area-actions button{flex:1}}

/* CRM */
.brenova-v107-crm-pills{display:flex;gap:8px;overflow-x:auto;padding:2px 1px 8px;scrollbar-width:none;direction:rtl}.brenova-v107-crm-pills::-webkit-scrollbar{display:none}
      .brenova-v107-crm-pill{flex:0 0 auto;border:1px solid #eee;background:rgba(255,255,255,.86);color:#57534e;border-radius:16px;min-height:38px;padding:0 12px;font-size:10px;font-weight:950;display:flex;align-items:center;gap:7px;box-shadow:0 8px 18px rgba(15,23,42,.045)}
      .brenova-v107-crm-pill.is-active{background:#2f241f;color:#fff;border-color:#2f241f;box-shadow:0 12px 24px rgba(47,36,31,.18)}
      .brenova-v107-crm-card{border:1px solid #f1f1f1;background:rgba(255,255,255,.88);border-radius:26px;padding:14px;box-shadow:0 14px 32px rgba(15,23,42,.045)}
      .brenova-v107-crm-card.is-done{opacity:.62;filter:saturate(.75)}
      @media(max-width:420px){.brenova-v107-crm-card .grid.grid-cols-4{gap:6px}.brenova-v107-crm-card .grid.grid-cols-4 button{font-size:8px;padding-inline:1px}}

/* Mianbor frame and visitor invoice spacing */







      img[src*="/assets/images/icon-"],img[src*="/assets/icons/logoheader"]{border-radius:999px;object-fit:contain;}
      .brenova-visitor-invoices-tab{padding-bottom:110px;}






/* Admin root surface */
body.brenova-executive-admin-v166 .tab-content[data-role-allowed="0"]{display:none!important;visibility:hidden!important;pointer-events:none!important}body.brenova-executive-admin-v166 .brenova-form-grid,body.brenova-executive-admin-v166 .grid{min-width:0}body.brenova-executive-admin-v166 .brenova-fixed-input,body.brenova-executive-admin-v166 input,body.brenova-executive-admin-v166 textarea,body.brenova-executive-admin-v166 select{box-sizing:border-box!important;max-width:100%!important;min-width:0!important;pointer-events:auto!important;touch-action:manipulation}body.brenova-executive-admin-v166 select{appearance:auto!important;-webkit-appearance:menulist!important;overflow:visible!important;white-space:normal!important}body.brenova-executive-admin-v166 textarea{overflow-y:auto!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important;resize:vertical}body.brenova-executive-admin-v166 input[type=checkbox]{width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;max-width:18px!important;overflow:visible!important;accent-color:#f97316;cursor:pointer}body.brenova-executive-admin-v166 .brenova-choice-row{min-width:0;overflow:hidden;cursor:pointer}body.brenova-executive-admin-v166 [dir=auto]{unicode-bidi:plaintext}@media(max-width:420px){body.brenova-executive-admin-v166 .brenova-form-grid{grid-template-columns:minmax(0,1fr)!important}body.brenova-executive-admin-v166 .brenova-form-grid .col-span-2{grid-column:span 1/span 1!important}}

/* Performance primitives */
.modal-bg{transition-duration:120ms!important;}
            .modal-content{transition-duration:140ms!important;will-change:transform,opacity;}

            .leaflet-container{will-change:transform;}

/* Product modal: keep the save action visible while only the fields scroll. */
.product-modal-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: min(90vh, 860px);
  max-height: min(90dvh, 860px);
}

.product-modal-header,
.product-modal-footer {
  flex: 0 0 auto;
}

.product-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.product-modal-footer {
  position: relative;
  box-shadow: 0 -10px 28px rgba(28, 25, 23, 0.08);
}

#product-save-button {
  min-height: 52px;
}

#product-save-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

@media (max-width: 639px) {
  .product-modal-panel {
    max-height: 94vh;
    max-height: 94dvh;
  }
}

/* V386 — modal action bars for marketer, procurement and warehouse roles.
 * Fixes hidden save/cancel controls by making every affected modal a capped flex panel:
 * header/action footer stay visible; only the content body scrolls.
 */
.brenova-modal-cancel-btn {
  min-height: 48px;
  border: 1px solid #e7e5e4;
  border-radius: 1.2rem;
  padding: 0 16px;
  background: #f5f5f4;
  color: #57534e;
  font-size: 12px;
  font-weight: 1000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 34%;
}

.customer-modal-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
  max-height: min(92vh, 92dvh);
}

#add-customer-modal .brenova-customer-form-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#add-customer-modal .customer-modal-footer {
  flex: 0 0 auto;
  display: grid !important;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  gap: 10px;
  padding-bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)) !important;
  box-shadow: 0 -10px 28px rgba(28, 25, 23, .08);
}

#add-customer-modal[data-customer-mode="edit"] .customer-modal-footer {
  display: grid !important;
}

.product-modal-footer {
  display: grid !important;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  align-items: stretch;
}

.product-modal-footer .brenova-modal-cancel-btn,
#product-save-button,
#customer-full-save-btn {
  width: 100%;
  min-height: 52px;
}

#visit-report-v246-modal .modal-content,
#visit-report-v355-manage-modal .modal-content,
#customer-tools-modal-v357 .modal-content,
#customer-followup-modal-v379 .modal-content,
#brenova-data-merge-modal .modal-content,
#brenova-notifications-modal .modal-content,
#brenova-notification-full-modal .modal-content {
  max-height: min(92vh, 92dvh) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

#visit-report-v246-modal .modal-content > :is(div, section, main):not(:first-child):not(:last-child),
#visit-report-v355-manage-modal .modal-content > :is(div, section, main):not(:first-child):not(:last-child),
#customer-tools-modal-v357 .modal-content > :is(div, section, main):not(:first-child):not(:last-child),
#customer-followup-modal-v379 .modal-content > :is(div, section, main):not(:first-child):not(:last-child),
#brenova-data-merge-modal .modal-content > :is(div, section, main):not(:first-child):not(:last-child),
#brenova-notifications-modal .modal-content > :is(div, section, main):not(:first-child):not(:last-child),
#brenova-notification-full-modal .modal-content > :is(div, section, main):not(:first-child):not(:last-child) {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.brenova-modal-action-bar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  gap: 9px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #e7e5e4;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 -10px 28px rgba(28, 25, 23, .08);
}

.brenova-modal-action-bar > button,
.brenova-modal-action-bar > .brenova-modal-cancel-btn {
  min-height: 48px;
  width: 100%;
}

.brenova-modal-action-bar.single-action {
  grid-template-columns: 1fr;
}

@media (max-width: 480px) {
  .customer-modal-panel,
  #product-modal .product-modal-panel,
  #visit-report-v246-modal .modal-content,
  #visit-report-v355-manage-modal .modal-content,
  #customer-tools-modal-v357 .modal-content,
  #customer-followup-modal-v379 .modal-content,
  #brenova-data-merge-modal .modal-content,
  #brenova-notifications-modal .modal-content,
  #brenova-notification-full-modal .modal-content {
    max-height: 94vh !important;
    max-height: 94dvh !important;
  }
  .customer-modal-footer,
  .product-modal-footer,
  .brenova-modal-action-bar {
    grid-template-columns: 1fr !important;
    padding-inline: 12px !important;
  }
}
.brenova-modal-action-bar.triple-action {
  grid-template-columns: minmax(0, .62fr) minmax(0, .86fr) minmax(0, 1.18fr);
}
@media (max-width: 480px) {
  .brenova-modal-action-bar.triple-action { grid-template-columns: 1fr !important; }
}

/* V388 — safe modal viewport above app footer.
 * The app bottom navigation is hidden while a modal is active.
 * Modal panels are capped to the visible viewport and only their body scrolls.
 */
:root {
  --brenova-modal-edge-gap: clamp(8px, 2.2dvh, 16px);
}

html.brenova-modal-open,
body.brenova-modal-open {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

body.brenova-modal-open #main-app > nav {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(120%) !important;
}

.brenova-modal-host {
  z-index: 99990 !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  padding: calc(var(--brenova-modal-edge-gap) + env(safe-area-inset-top, 0px)) var(--brenova-modal-edge-gap) calc(var(--brenova-modal-edge-gap) + env(safe-area-inset-bottom, 0px)) !important;
  overflow: hidden !important;
  touch-action: none !important;
}

.brenova-modal-host .modal-bg {
  z-index: 0 !important;
}

.brenova-modal-host > .modal-content,
.brenova-modal-host .brenova-modal-panel {
  z-index: 1 !important;
  max-height: calc(100vh - 24px) !important;
  max-height: calc(100dvh - ((var(--brenova-modal-edge-gap) * 2) + env(safe-area-inset-top, 0px) + env(safe-area-inset-bottom, 0px))) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  touch-action: auto !important;
}

.brenova-modal-host > .modal-content > :is(header, .modal-header, .product-modal-header, .customer-modal-header, .warehouse-modal-head),
.brenova-modal-host > .modal-content > :is(footer, .modal-footer, .customer-modal-footer, .product-modal-footer, .warehouse-modal-footer, .brenova-modal-action-bar) {
  flex: 0 0 auto !important;
}

.brenova-modal-host > .modal-content > :is(.brenova-customer-form-body, .product-modal-body, .warehouse-modal-body, .modal-scroll-body) {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
}

/* V403 — customer edit modal: one canonical, touch-safe scroll container. */
#add-customer-modal .customer-modal-panel{
  display:flex!important;flex-direction:column!important;min-height:0!important;
  height:min(92dvh,92vh)!important;max-height:min(92dvh,92vh)!important;overflow:hidden!important;
}
#add-customer-modal .customer-modal-header,#add-customer-modal .customer-modal-footer{
  flex:0 0 auto!important;position:relative!important;inset:auto!important;z-index:12!important;
}
#add-customer-modal #customer-form-shell.brenova-customer-form-body{
  display:flex!important;flex:1 1 0!important;min-height:0!important;max-height:none!important;
  overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior-y:contain!important;
  touch-action:pan-y pinch-zoom!important;-webkit-overflow-scrolling:touch!important;
  padding-bottom:max(24px,env(safe-area-inset-bottom))!important;scrollbar-gutter:stable;
}
#add-customer-modal[data-customer-mode="edit"] #customer-more-details{
  display:block!important;visibility:visible!important;opacity:1!important;filter:none!important;
  pointer-events:auto!important;flex:none!important;min-height:max-content!important;overflow:visible!important;
}
#add-customer-modal[data-customer-mode="edit"] #customer-more-details>summary{
  display:flex!important;visibility:visible!important;opacity:1!important;filter:none!important;pointer-events:auto!important;
}
#add-customer-modal[data-customer-mode="edit"] #customer-more-details[open]>.customer-details-body,
#add-customer-modal[data-customer-mode="edit"] #customer-more-body{
  display:grid!important;visibility:visible!important;opacity:1!important;filter:none!important;overflow:visible!important;
}
#add-customer-modal[data-customer-mode="edit"] #customer-extra-fields{
  display:grid!important;visibility:visible!important;opacity:1!important;filter:none!important;pointer-events:auto!important;
}
@media(max-width:640px){
  #add-customer-modal{align-items:flex-end!important;padding:0!important;touch-action:manipulation!important;}
  #add-customer-modal .customer-modal-panel{width:100%!important;height:94dvh!important;max-height:94dvh!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important;}
}
#add-customer-modal .customer-modal-panel>.sticky.top-0{
  flex:0 0 auto!important;position:relative!important;top:auto!important;z-index:12!important;
}


/* V406: customer registration/edit modal must own its scroll area. Later legacy form rules used grid and clipped details on phones. */
#add-customer-modal .customer-modal-panel.modal-content{
  display:flex!important;
  flex-direction:column!important;
  height:min(92vh,92dvh)!important;
  max-height:min(92vh,92dvh)!important;
  overflow:hidden!important;
}
#add-customer-modal .sticky.top-0,
#add-customer-modal .customer-modal-footer{
  flex:0 0 auto!important;
}
#add-customer-modal .brenova-customer-form-body#customer-form-shell{
  display:flex!important;
  flex:1 1 auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-y pinch-zoom!important;
  padding-bottom:calc(16px + env(safe-area-inset-bottom,0px))!important;
}
#add-customer-modal .customer-essential-fields,
#add-customer-modal .customer-details,
#add-customer-modal .customer-map-section,
#add-customer-modal .customer-quick-actions{
  flex:0 0 auto!important;
}
#add-customer-modal .customer-details[open] > .customer-details-body{
  display:grid!important;
  visibility:visible!important;
  opacity:1!important;
}
@media (max-width:640px){
  #add-customer-modal .customer-modal-panel.modal-content{
    height:min(94vh,94dvh)!important;
    max-height:min(94vh,94dvh)!important;
  }
}
