/* Feature modules added on the separated development copy only. */
.sync-warning-bar{
  position:sticky;
  top:0;
  z-index:30;
  margin:0 0 14px;
  padding:12px 16px;
  border:1px solid #f0c7c7;
  border-radius:12px;
  background:#fff0f0;
  color:#8b1f1f;
  font-weight:900;
  line-height:1.7;
  box-shadow:0 12px 26px rgba(139,31,31,.08);
}

/* Invoice record actions stay visible in the app and never enter print output. */
.invoice-record-card{
  display:grid;
  gap:10px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  padding:10px;
}
.invoice-record-card.active{
  border-color:color-mix(in srgb,var(--brand) 48%,var(--line));
  box-shadow:0 8px 18px rgba(13,76,60,.08);
}
.invoice-record-open{
  display:grid;
  gap:5px;
  width:100%;
  min-width:0;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  text-align:right;
}
.invoice-record-open b,.invoice-record-open small{
  display:block;
  min-width:0;
  white-space:normal;
  overflow-wrap:anywhere;
}
.invoice-record-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:7px;
}
.btn.danger{
  border-color:#e1aaaa;
  background:#fff5f5;
  color:#a52f35;
}
.invoice-display-meta .invoice-record-actions{
  grid-column:1 / -1;
  margin-top:5px;
}
#independentInvoiceEditModal .modal-body,
#waterInvoiceEditModal .modal-body,
#annualInvoiceEditModal .modal-body{
  max-height:min(76vh,680px);
  overflow:auto;
}
@media(max-width:700px){
  .invoice-record-actions{
    display:grid;
    grid-template-columns:1fr;
  }
  .invoice-record-actions>*{
    width:100%;
  }
}
@media print{
  .invoice-record-actions,
  [data-edit-ind-invoice],
  [data-delete-ind-invoice],
  [data-archive-ind-invoice],
  [data-edit-water-bill],
  [data-delete-water-bill],
  [data-archive-water-bill]{
    display:none!important;
  }
}
.sync-warning-bar.ok{
  border-color:#cde9dc;
  background:#eefaf3;
  color:#0d6840;
}
.sync-warning-bar small{
  display:block;
  margin-top:2px;
  color:inherit;
  opacity:.78;
  font-weight:800;
}
.feature-kpi-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:10px;
  margin-bottom:14px;
}
.feature-kpi{
  border:1px solid var(--line);
  border-radius:12px;
  background:#fbfdfc;
  padding:13px;
}
.feature-kpi small{
  display:block;
  color:var(--muted);
  font-weight:800;
  margin-bottom:5px;
}
.feature-kpi b{
  color:var(--brand);
  font-size:20px;
}
.feature-mini-note{
  color:var(--muted);
  font-size:12px;
  line-height:1.8;
  font-weight:700;
}
.feature-review-list{
  display:grid;
  gap:8px;
  margin-top:12px;
}
.feature-review-item{
  display:grid;
  grid-template-columns:1fr auto;
  gap:12px;
  align-items:center;
  border:1px solid var(--line);
  border-radius:12px;
  padding:11px 12px;
  background:#fff;
}
.feature-review-item.error{
  border-color:#efb7b7;
  background:#fff6f6;
}
.feature-review-item b{
  color:var(--brand);
}
.feature-review-item small{
  display:block;
  color:var(--muted);
  margin-top:4px;
  line-height:1.6;
}
.feature-assistant-box{
  min-height:220px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  padding:14px;
  line-height:1.9;
  white-space:pre-wrap;
  color:#183431;
  font-weight:800;
}
.feature-archive-frame{
  width:100%;
  min-height:70vh;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
}
.feature-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 9px;
  border-radius:999px;
  background:#eef7f4;
  color:var(--brand);
  font-size:12px;
  font-weight:900;
}
.feature-form-note{
  margin:8px 0 0;
  color:var(--muted);
  font-size:12px;
  line-height:1.8;
  font-weight:800;
}
.feature-form-note.warning{
  color:#9a4a00;
}
.feature-panel-stack{
  display:grid;
  gap:16px;
}
.feature-action-strip{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin-top:12px;
}
.feature-period-panel{
  border:1px solid var(--line);
  border-radius:14px;
  background:#fbfdfc;
  padding:12px;
  margin:12px 0 0;
}
.feature-period-panel .grid2{
  align-items:end;
}
.feature-file-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:8px 12px;
  border:1px dashed var(--line);
  border-radius:10px;
  background:#fff;
  color:var(--brand);
  font-weight:900;
}
.sync-warning-bar.hidden{
  display:none;
}
.water-history-card{
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  padding:12px;
}
.water-history-card h3{
  margin:0 0 8px;
  color:var(--brand);
}
.water-history-card small{
  color:var(--muted);
  font-weight:800;
}
.archive-card{
  display:grid;
  grid-template-columns:1fr auto;
  gap:12px;
  align-items:center;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  padding:14px;
}
.archive-card h3{
  margin:0 0 6px;
  color:var(--brand);
}
.archive-card p{
  margin:0;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}
.platform-settings-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
}
.platform-card{
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  padding:14px;
}
.platform-card h3{
  margin:0 0 10px;
  color:var(--brand);
}
.platform-card .asset-preview,
.platform-card .bank-preview{
  margin-top:10px;
}
.platform-card .account-grid{
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important;
}
.platform-card .account-card b{
  overflow-wrap:anywhere;
  word-break:break-word;
}
.assistant-quick-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:10px 0;
}
@media(max-width:700px){
  .feature-review-item{
    grid-template-columns:1fr;
  }
  .archive-card{
    grid-template-columns:1fr;
  }
  .feature-period-panel .grid2{
    grid-template-columns:1fr;
  }
}

@media screen{
  html,body{
    max-width:100%!important;
    overflow-x:hidden!important;
  }
  #appShell,.app,.content,.sidebar,.view,.panel{
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
  .content{
    overflow-x:hidden!important;
  }
  .table-wrap{
    overscroll-behavior-x:contain;
  }
  #bankSettingsPanel{
    display:none!important;
  }
  .print-bridge-frame{
    position:fixed;
    width:0;
    height:0;
    border:0;
    inset:auto auto 0 0;
    opacity:0;
    pointer-events:none;
  }
  .sync-warning-bar{
    position:fixed!important;
    left:18px!important;
    right:auto!important;
    bottom:18px!important;
    top:auto!important;
    z-index:9999!important;
    width:min(360px,calc(100vw - 36px))!important;
    margin:0!important;
    padding:12px 16px!important;
    border-radius:999px!important;
    background:#fff6f6!important;
    box-shadow:0 18px 42px rgba(20,35,30,.18),inset 0 1px 0 rgba(255,255,255,.9)!important;
    font-size:13px!important;
  }
  .sync-warning-bar.ok{
    background:linear-gradient(145deg,#ffffff,#eefaf4)!important;
    border-color:#cbe8d9!important;
    color:#0d6840!important;
  }
  .sync-warning-bar small{
    display:block;
    margin-top:1px;
    font-size:11px;
    line-height:1.4;
  }
  .feature-period-panel{
    padding:10px;
    background:linear-gradient(145deg,#ffffff,#f3faf7);
    box-shadow:inset 0 1px 0 #fff,0 10px 24px rgba(12,62,50,.06);
  }
  .feature-period-compact{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    align-items:center;
  }
  .date-chip{
    display:flex;
    align-items:center;
    gap:8px;
    min-height:44px;
    padding:6px 10px;
    border:1px solid var(--line);
    border-radius:12px;
    background:linear-gradient(145deg,#fff,#f6faf8);
    color:var(--brand);
    font-weight:900;
    box-shadow:inset 0 1px 0 #fff,0 8px 18px rgba(12,62,50,.06);
  }
  .date-chip input{
    border:0!important;
    background:transparent!important;
    padding:0!important;
    min-height:28px!important;
    width:142px!important;
    color:#123531!important;
  }
  .period-type-btn.active{
    border-color:#d8b653!important;
    background:linear-gradient(145deg,#fffdf7,#f4ead0)!important;
    color:#0d4c3c!important;
  }
  .btn,.icon-btn,.lux-select-btn{
    box-shadow:inset 0 1px 0 rgba(255,255,255,.95),0 9px 18px rgba(12,42,35,.11),0 2px 0 rgba(12,70,58,.18)!important;
    transform:translateZ(0);
  }
  .btn:active,.icon-btn:active,.lux-select-btn:active{
    transform:translateY(1px);
    box-shadow:inset 0 1px 2px rgba(0,0,0,.08),0 5px 10px rgba(12,42,35,.10)!important;
  }
  .payment-action-btn,
  .payment-action-btn.add,
  .payment-action-btn.refund,
  .btn.payment-action-btn.add,
  .btn.payment-action-btn.refund{
    background:linear-gradient(145deg,#fffdf7 0%,#f7eed6 54%,#ead9a9 100%)!important;
    color:#174785!important;
    border-color:#d4bf7a!important;
    text-shadow:0 1px 0 #fff!important;
  }
  .payment-action-btn .action-symbol{
    display:none!important;
  }
  .platform-card,.water-history-card,.archive-card,.feature-kpi,.feature-review-item{
    box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 12px 28px rgba(12,62,50,.07);
  }
  .feature-kpi b,.num{
    font-variant-numeric:tabular-nums;
  }
  .hijri-date{
    display:inline-block;
    margin-top:2px;
    color:#e5d28a;
    font-size:12px;
    font-weight:900;
  }
  .modal .modal-card{
    max-height:min(92vh,980px);
  }
  .modal .modal-head{
    position:sticky!important;
    top:0!important;
    z-index:5!important;
    background:#fff!important;
  }
  .modal .close{
    align-self:flex-start!important;
    flex:0 0 auto!important;
  }
  .modal iframe{
    max-width:100%;
  }
  .water-units-panel{
    margin-top:14px;
    padding:12px;
    border:1px solid var(--line);
    border-radius:14px;
    background:linear-gradient(145deg,#ffffff,#f4fbf8);
  }
  .water-units-list{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:10px;
    margin-top:12px;
  }
  .water-unit-row{
    display:grid;
    gap:6px;
    padding:10px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#fff;
    box-shadow:inset 0 1px 0 #fff,0 8px 16px rgba(12,62,50,.05);
  }
  .water-unit-row span{
    color:var(--brand);
    font-weight:900;
  }
  .water-unit-row input,
  .water-image-fields input{
    border:1px solid var(--line);
    border-radius:10px;
    min-height:38px;
    padding:8px 10px;
    font:inherit;
    color:#153b35;
    background:#fff;
  }
  .water-image-review{
    display:grid;
    grid-template-columns:140px 1fr auto;
    gap:12px;
    align-items:center;
    border:1px solid var(--line);
    border-radius:16px;
    padding:12px;
    background:#fff;
    box-shadow:inset 0 1px 0 #fff,0 12px 28px rgba(12,62,50,.07);
  }
  .water-image-review.error{
    border-color:#efb7b7;
    background:#fff8f8;
  }
  .water-image-review img{
    width:140px;
    aspect-ratio:3/4;
    object-fit:cover;
    border-radius:12px;
    border:1px solid var(--line);
  }
  .water-image-fields{
    display:grid;
    gap:8px;
  }
  .water-image-fields label{
    display:grid;
    gap:4px;
    color:var(--muted);
    font-size:12px;
    font-weight:900;
  }
  .water-ocr-status{
    display:inline-flex!important;
    align-items:center;
    justify-content:flex-start;
    width:max-content;
    max-width:100%;
    padding:5px 9px;
    border-radius:999px;
    background:#eef7f4;
    color:var(--brand)!important;
    font-size:11px!important;
    font-weight:900!important;
  }
  .archive-card-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    flex-wrap:wrap;
  }
  .lux-select-menu{
    border-radius:18px!important;
    border:1px solid rgba(13,76,60,.16)!important;
    box-shadow:0 24px 50px rgba(8,45,36,.20),inset 0 1px 0 #fff!important;
    background:linear-gradient(145deg,#ffffff,#f8fbfa)!important;
    overflow:hidden!important;
  }
  .lux-option{
    border-radius:12px!important;
    margin:5px!important;
    box-shadow:inset 0 1px 0 #fff,0 8px 18px rgba(12,62,50,.05)!important;
  }
  .lux-select.association-select .lux-select-btn,
  .lux-select.invoice-select .lux-select-btn,
  .lux-select.theme-select .lux-select-btn{
    min-height:56px!important;
    border-radius:16px!important;
    border:1px solid color-mix(in srgb,var(--brand) 18%,#d8e4df)!important;
    background:linear-gradient(145deg,#ffffff,#f4faf8)!important;
    box-shadow:inset 0 1px 0 #fff,0 14px 28px rgba(13,76,60,.10)!important;
    color:var(--brand)!important;
    font-size:18px!important;
    font-weight:900!important;
  }
  .lux-select.association-select .lux-select-menu,
  .lux-select.invoice-select .lux-select-menu,
  .lux-select.name-select .lux-select-menu,
  .lux-select.theme-select .lux-select-menu{
    max-height:340px!important;
    overflow:auto!important;
    padding:8px!important;
  }
  .lux-select.association-select .lux-option,
  .lux-select.invoice-select .lux-option,
  .lux-select.name-select .lux-option,
  .lux-select.theme-select .lux-option{
    min-height:48px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    font-size:16px!important;
    color:var(--brand)!important;
    background:linear-gradient(145deg,#fff,#f8fbfa)!important;
  }
  .lux-select.association-select .lux-option.selected,
  .lux-select.invoice-select .lux-option.selected,
  .lux-select.theme-select .lux-option.selected{
    background:linear-gradient(145deg,var(--brand),color-mix(in srgb,var(--brand) 82%,white))!important;
    color:#fff!important;
    box-shadow:0 12px 22px rgba(13,76,60,.18)!important;
  }
  #independentInvoicesView .feature-kpi-grid{
    margin-bottom:12px;
  }
  #independentInvoicesView .table-wrap{
    margin-top:10px;
  }
  #indInvoiceCustomName.closest-hidden,
  .field.hidden{
    display:none!important;
  }
  [data-platform-theme] body{
    background:
      radial-gradient(circle at 72% 8%,color-mix(in srgb,var(--theme-accent) 18%,transparent) 0,transparent 33%),
      linear-gradient(135deg,var(--theme-bg1),var(--theme-bg2))!important;
  }
  [data-platform-theme] .content{
    background:
      radial-gradient(circle at 80% 0,color-mix(in srgb,var(--theme-accent) 12%,transparent),transparent 32rem),
      linear-gradient(135deg,color-mix(in srgb,var(--theme-bg1) 88%,white),var(--theme-bg2))!important;
  }

/* Controlled v5 UI adjustments: wrapping selectors, annual preview, and the confirm bell. */
.lux-select .lux-select-btn{
  height:auto!important;
  min-height:52px;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere;
  word-break:normal;
  line-height:1.5;
}
.lux-select-menu{
  max-width:min(100%,calc(100vw - 24px));
  overflow-x:hidden!important;
  overflow-y:auto!important;
}
.lux-option{
  height:auto!important;
  min-height:48px!important;
  justify-content:flex-start!important;
  text-align:right!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere;
  word-break:normal;
  line-height:1.5;
}
.association-picker-button,
.association-picker-menu button{
  height:auto!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere;
  word-break:normal;
  line-height:1.5;
}
.association-picker-button::after{
  flex:0 0 auto;
}
.association-picker-menu{
  max-width:100%;
  overflow-x:hidden!important;
  overflow-y:auto!important;
}
.invoice-display-meta{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px 14px;
  margin:0 0 12px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#f7faf9;
  color:var(--brand);
}
.invoice-display-meta span,
.invoice-display-meta time{
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}
.annual-fee-expected{
  margin:10px 0 14px;
  padding:12px 14px;
  border:1px solid color-mix(in srgb,var(--brand) 24%,var(--line));
  border-radius:10px;
  background:#eef7f4;
  color:var(--brand);
  font-weight:900;
}
#annualFeeModal .annual-fee-preview-card{
  display:flex;
  flex-direction:column;
  width:100%;
  max-width:1500px;
  max-height:calc(100dvh - 20px);
  min-height:0;
  margin-inline:auto;
  overflow:hidden;
}
#annualFeeModal .modal-body{
  flex:1 1 auto;
  max-height:none;
  min-height:0;
  overflow-x:hidden;
  overflow-y:auto;
  padding-bottom:24px;
}
#confirmModal .lux-dialog-card{
  display:flex;
  flex-direction:column;
  max-height:calc(100dvh - 20px);
  min-height:0;
  overflow:hidden;
}
#confirmModal .modal-head,
#annualFeeModal .modal-head{
  flex:0 0 auto;
}
#confirmModal .modal-body{
  flex:1 1 auto;
  min-height:0;
  overflow-x:hidden;
  overflow-y:auto;
  padding-bottom:24px;
}
.modal-actions-footer{
  position:relative;
  z-index:4;
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  width:100%;
  padding:12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top:1px solid var(--line);
  background:#fff;
  box-shadow:0 -8px 18px rgba(18,66,60,.06);
}
.invoice-follow-table .invoice-number-col{
  width:5ch;
  min-width:5ch;
  max-width:6ch;
  text-align:center;
  white-space:normal;
}
.invoice-follow-table .invoice-number-heading{
  display:inline-block;
  line-height:1.08;
  white-space:normal;
  word-break:normal;
}
#annualFeePreview{
  width:100%;
  overflow:hidden;
  overscroll-behavior:contain;
  background:#d5d8d5;
  border-radius:10px;
}
#annualFeePreview .annual-preview-fit{
  position:relative;
  width:100%;
  overflow:hidden;
}
#annualFeePreview .annual-preview-frame{
  display:block;
  position:absolute;
  top:0;
  left:0;
  width:1120px;
  max-width:none;
  height:800px;
  margin:0;
  border:0;
  background:#fff;
  transform-origin:top left;
}
#annualInvoiceModal.annual-archive-preview-modal .modal-card{
  width:min(1500px,calc(100vw - 48px))!important;
  max-height:calc(100vh - 24px);
  overflow:hidden;
}
#annualInvoiceModal.annual-archive-preview-modal .modal-body{
  max-height:calc(100vh - 88px);
  overflow-x:hidden;
  overflow-y:auto;
}
#annualInvoiceContent .annual-archive-preview-fit{
  position:relative;
  width:100%;
  overflow:hidden;
  background:#d5d8d5;
  border-radius:10px;
}
#annualInvoiceContent .annual-archive-preview-frame{
  display:block;
  position:absolute;
  top:0;
  left:0;
  width:1120px;
  max-width:none;
  height:800px;
  margin:0;
  border:0;
  border-radius:0;
  background:#fff;
  box-shadow:none;
  transform-origin:top left;
}
#confirmModal .lux-dialog-icon .lux-dialog-bell{
  display:block;
  width:30px;
  height:30px;
  fill:none;
  stroke:#f4d58b;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
@media(max-width:820px){
  #annualFeeModal .annual-fee-preview-card{
    width:100%;
    max-width:100%;
    max-height:calc(100dvh - 12px);
  }
  #annualFeeModal .modal-body{
    max-height:none;
  }
  #confirmModal .lux-dialog-card{max-height:calc(100dvh - 12px)}
  .modal-actions-footer{
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
    padding:10px 12px calc(10px + env(safe-area-inset-bottom));
  }
  .modal-actions-footer .btn{width:100%;min-height:44px}
  #annualInvoiceModal.annual-archive-preview-modal .modal-card{
    width:calc(100vw - 18px)!important;
    max-height:calc(100vh - 18px);
  }
  #annualInvoiceModal.annual-archive-preview-modal .modal-body{
    max-height:calc(100vh - 80px);
  }
  .invoice-display-meta{
    align-items:flex-start;
    flex-direction:column;
  }
}
  [data-platform-theme] .sidebar{
    background:linear-gradient(180deg,var(--theme-side1),var(--theme-side2))!important;
    color:var(--theme-text)!important;
  }
  [data-platform-theme] .association-box{
    background:color-mix(in srgb,var(--theme-side1) 72%,white 7%)!important;
    border-color:color-mix(in srgb,var(--theme-gold) 32%,white 8%)!important;
  }
  [data-platform-theme] .association-picker-button{
    background:linear-gradient(145deg,color-mix(in srgb,var(--theme-side1) 88%,white),color-mix(in srgb,var(--theme-accent) 32%,var(--theme-side2)))!important;
    border-color:color-mix(in srgb,var(--theme-gold) 42%,white 8%)!important;
    color:var(--theme-text)!important;
  }
  [data-platform-theme] .association-picker-menu{
    background:linear-gradient(180deg,var(--theme-side1),var(--theme-side2))!important;
    border-color:color-mix(in srgb,var(--theme-gold) 45%,white 8%)!important;
  }
  [data-platform-theme] .association-picker-menu button.selected{
    background:linear-gradient(145deg,var(--theme-gold),color-mix(in srgb,var(--theme-gold) 72%,white))!important;
    color:color-mix(in srgb,var(--theme-side2) 88%,black)!important;
  }
  [data-platform-theme] .home-hero{
    background:linear-gradient(125deg,var(--theme-side1),var(--theme-accent),var(--theme-gold),var(--theme-side1))!important;
    background-size:240% 240%!important;
    animation:featureHeroFlow 11s ease-in-out infinite!important;
  }
  @keyframes featureHeroFlow{
    0%,100%{background-position:0% 50%}
    50%{background-position:100% 50%}
  }
  .hijri-date{
    display:block;
    direction:ltr;
    unicode-bidi:plaintext;
    text-align:left;
    letter-spacing:0;
  }
  [data-platform-theme] .nav button,
  [data-platform-theme] .current-association{
    background:color-mix(in srgb,var(--theme-side1) 72%,white 6%)!important;
    border-color:color-mix(in srgb,var(--theme-accent) 35%,white 10%)!important;
  }
  [data-platform-theme] .nav button.active{
    background:color-mix(in srgb,var(--theme-accent) 28%,var(--theme-side1))!important;
    border-color:var(--theme-gold)!important;
  }
  [data-platform-theme] .panel,
  [data-platform-theme] .platform-card,
  [data-platform-theme] .water-history-card,
  [data-platform-theme] .archive-card{
    border-color:color-mix(in srgb,var(--theme-accent) 20%,#d8e4df)!important;
  }
  [data-platform-theme="classic"]{--theme-bg1:#f8fbf8;--theme-bg2:#f3f1e8;--theme-side1:#0d4c3c;--theme-side2:#082c25;--theme-accent:#0d4c3c;--theme-gold:#d8b653;--theme-text:#fff}
  [data-platform-theme="royalBlue"]{--brand:#123f86;--brand2:#0f2e65;--dark:#0b234f;--theme-bg1:#f5f8ff;--theme-bg2:#eef3ff;--theme-side1:#123f86;--theme-side2:#071b42;--theme-accent:#1d5fd0;--theme-gold:#d8b653;--theme-text:#fff}
  [data-platform-theme="navy"]{--brand:#0e2f5f;--brand2:#0a2247;--dark:#07172f;--theme-bg1:#f5f8fc;--theme-bg2:#e9eef8;--theme-side1:#0e2f5f;--theme-side2:#06162e;--theme-accent:#3c72b8;--theme-gold:#d6b65e;--theme-text:#fff}
  [data-platform-theme="azure"]{--brand:#1769a7;--brand2:#0f5082;--dark:#0a365b;--theme-bg1:#f4fbff;--theme-bg2:#e8f4fb;--theme-side1:#1769a7;--theme-side2:#0a365b;--theme-accent:#3d9bd9;--theme-gold:#d9b75e;--theme-text:#fff}
  [data-platform-theme="sapphire"]{--brand:#0b4ea2;--brand2:#07346f;--dark:#051f45;--theme-bg1:#f4f8ff;--theme-bg2:#e8f0ff;--theme-side1:#0b4ea2;--theme-side2:#051f45;--theme-accent:#2d74d8;--theme-gold:#d8b653;--theme-text:#fff}
  [data-platform-theme="cobalt"]{--brand:#234a8f;--brand2:#173469;--dark:#0c1f43;--theme-bg1:#f6f8fd;--theme-bg2:#e8eefb;--theme-side1:#234a8f;--theme-side2:#0c1f43;--theme-accent:#436ebc;--theme-gold:#cdae55;--theme-text:#fff}
  [data-platform-theme="midnight"]{--brand:#172c3a;--brand2:#0f1f2b;--dark:#08131b;--theme-bg1:#f5f7f8;--theme-bg2:#e9edf0;--theme-side1:#172c3a;--theme-side2:#08131b;--theme-accent:#547287;--theme-gold:#d0ae53;--theme-text:#fff}
  [data-platform-theme="emerald"]{--brand:#076454;--brand2:#064a40;--dark:#06332d;--theme-bg1:#f5fbf8;--theme-bg2:#e9f4ef;--theme-side1:#076454;--theme-side2:#05362f;--theme-accent:#14967f;--theme-gold:#d8b653;--theme-text:#fff}
  [data-platform-theme="teal"]{--brand:#08707c;--brand2:#05515b;--dark:#03343b;--theme-bg1:#f2fbfb;--theme-bg2:#e7f4f4;--theme-side1:#08707c;--theme-side2:#03343b;--theme-accent:#18a7b4;--theme-gold:#d6b65e;--theme-text:#fff}
  [data-platform-theme="olive"]{--brand:#4a5f2a;--brand2:#33431d;--dark:#202b12;--theme-bg1:#fbfcf6;--theme-bg2:#eef2e0;--theme-side1:#4a5f2a;--theme-side2:#202b12;--theme-accent:#7f9b45;--theme-gold:#d4b262;--theme-text:#fff}
  [data-platform-theme="burgundy"]{--brand:#7a1f37;--brand2:#5c1628;--dark:#3d0f1b;--theme-bg1:#fff7f8;--theme-bg2:#f7edf0;--theme-side1:#7a1f37;--theme-side2:#3d0f1b;--theme-accent:#a5304d;--theme-gold:#d8b653;--theme-text:#fff}
  [data-platform-theme="ruby"]{--brand:#8b1f2d;--brand2:#641620;--dark:#3f0c14;--theme-bg1:#fff7f7;--theme-bg2:#f8ecee;--theme-side1:#8b1f2d;--theme-side2:#3f0c14;--theme-accent:#bd3345;--theme-gold:#d6b65e;--theme-text:#fff}
  [data-platform-theme="roseGold"]{--brand:#8f4d5d;--brand2:#673541;--dark:#422129;--theme-bg1:#fff8f8;--theme-bg2:#f4e9e6;--theme-side1:#8f4d5d;--theme-side2:#422129;--theme-accent:#c4818f;--theme-gold:#d6ab73;--theme-text:#fff}
  [data-platform-theme="graphite"]{--brand:#303841;--brand2:#222930;--dark:#14191f;--theme-bg1:#f7f8f8;--theme-bg2:#eeeeec;--theme-side1:#303841;--theme-side2:#14191f;--theme-accent:#6f7b86;--theme-gold:#c9ad5d;--theme-text:#fff}
  [data-platform-theme="blackGold"]{--brand:#1b1a17;--brand2:#11100e;--dark:#050504;--theme-bg1:#fffdf7;--theme-bg2:#f2ead7;--theme-side1:#1b1a17;--theme-side2:#050504;--theme-accent:#d2ad4e;--theme-gold:#d2ad4e;--theme-text:#fff}
  [data-platform-theme="plum"]{--brand:#4c2a67;--brand2:#361c4d;--dark:#241033;--theme-bg1:#fbf8ff;--theme-bg2:#f0eaf7;--theme-side1:#4c2a67;--theme-side2:#241033;--theme-accent:#7b4cac;--theme-gold:#d6b65e;--theme-text:#fff}
  [data-platform-theme="amethyst"]{--brand:#5d3b88;--brand2:#432865;--dark:#2b183f;--theme-bg1:#fbf8ff;--theme-bg2:#eee8f7;--theme-side1:#5d3b88;--theme-side2:#2b183f;--theme-accent:#906bc3;--theme-gold:#d6b65e;--theme-text:#fff}
  [data-platform-theme="silver"]{--brand:#56616a;--brand2:#3c454d;--dark:#252c32;--theme-bg1:#fafafa;--theme-bg2:#edf0f1;--theme-side1:#56616a;--theme-side2:#252c32;--theme-accent:#89949d;--theme-gold:#c9ad5d;--theme-text:#fff}
  [data-platform-theme="desertGold"]{--brand:#82612d;--brand2:#5e441f;--dark:#3c2a11;--theme-bg1:#fffaf0;--theme-bg2:#f0e3c9;--theme-side1:#82612d;--theme-side2:#3c2a11;--theme-accent:#b68a3c;--theme-gold:#d6b65e;--theme-text:#fff}
  [data-platform-theme="coffee"]{--brand:#4c3526;--brand2:#342319;--dark:#20140d;--theme-bg1:#fbf8f4;--theme-bg2:#eee5d9;--theme-side1:#4c3526;--theme-side2:#20140d;--theme-accent:#8a6244;--theme-gold:#d4b262;--theme-text:#fff}
  [data-platform-theme="ocean"]{--brand:#0b5c77;--brand2:#084358;--dark:#052b39;--theme-bg1:#f2fbff;--theme-bg2:#e3f1f6;--theme-side1:#0b5c77;--theme-side2:#052b39;--theme-accent:#1693b5;--theme-gold:#d4b262;--theme-text:#fff}
  [data-platform-theme="royalIndigo"]{--brand:#263b8f;--brand2:#1a2a6a;--dark:#10183d;--theme-bg1:#f5f6ff;--theme-bg2:#e7eaff;--theme-side1:#263b8f;--theme-side2:#10183d;--theme-accent:#596fe0;--theme-gold:#d7b65b;--theme-text:#fff}
  [data-platform-theme="iceBlue"]{--brand:#2c6f9f;--brand2:#1e5278;--dark:#123148;--theme-bg1:#f7fcff;--theme-bg2:#e9f6ff;--theme-side1:#2c6f9f;--theme-side2:#123148;--theme-accent:#8fc9ee;--theme-gold:#d2b45e;--theme-text:#fff}
  [data-platform-theme="petrol"]{--brand:#064f63;--brand2:#043b4b;--dark:#032734;--theme-bg1:#f2fbfc;--theme-bg2:#e4f2f4;--theme-side1:#064f63;--theme-side2:#032734;--theme-accent:#10839d;--theme-gold:#d4b262;--theme-text:#fff}
  [data-platform-theme="turquoise"]{--brand:#11828b;--brand2:#0a5f67;--dark:#053c42;--theme-bg1:#f1fcfc;--theme-bg2:#e2f6f6;--theme-side1:#11828b;--theme-side2:#053c42;--theme-accent:#35bcc7;--theme-gold:#d8b653;--theme-text:#fff}
  [data-platform-theme="forest"]{--brand:#134d34;--brand2:#0d3926;--dark:#092617;--theme-bg1:#f5faf7;--theme-bg2:#e6f0ea;--theme-side1:#134d34;--theme-side2:#092617;--theme-accent:#2d7c55;--theme-gold:#d0ae53;--theme-text:#fff}
  [data-platform-theme="jade"]{--brand:#0b765d;--brand2:#075542;--dark:#04372b;--theme-bg1:#f2fbf8;--theme-bg2:#e5f5ef;--theme-side1:#0b765d;--theme-side2:#04372b;--theme-accent:#1fb28d;--theme-gold:#d8b653;--theme-text:#fff}
  [data-platform-theme="charcoal"]{--brand:#252b33;--brand2:#1b2027;--dark:#0f1217;--theme-bg1:#f7f8f9;--theme-bg2:#e9ecef;--theme-side1:#252b33;--theme-side2:#0f1217;--theme-accent:#586373;--theme-gold:#c9ad5d;--theme-text:#fff}
  [data-platform-theme="pearl"]{--brand:#68747c;--brand2:#4d5962;--dark:#303941;--theme-bg1:#ffffff;--theme-bg2:#f1f3f4;--theme-side1:#68747c;--theme-side2:#303941;--theme-accent:#aab4bb;--theme-gold:#c9ad5d;--theme-text:#fff}
  [data-platform-theme="bronze"]{--brand:#6e4b26;--brand2:#4e351a;--dark:#30200f;--theme-bg1:#fff9f2;--theme-bg2:#efe2d2;--theme-side1:#6e4b26;--theme-side2:#30200f;--theme-accent:#a87337;--theme-gold:#d6b65e;--theme-text:#fff}
  [data-platform-theme="maroon"]{--brand:#68253d;--brand2:#4b1a2c;--dark:#30101c;--theme-bg1:#fff7fa;--theme-bg2:#f3e6ec;--theme-side1:#68253d;--theme-side2:#30101c;--theme-accent:#99405d;--theme-gold:#d4b262;--theme-text:#fff}
  [data-platform-theme="violet"]{--brand:#3e2b79;--brand2:#2c1d59;--dark:#1c1138;--theme-bg1:#faf8ff;--theme-bg2:#ece8f9;--theme-side1:#3e2b79;--theme-side2:#1c1138;--theme-accent:#6d55bf;--theme-gold:#d8b653;--theme-text:#fff}
  [data-platform-theme="steel"]{--brand:#365a78;--brand2:#263f56;--dark:#162637;--theme-bg1:#f5f8fb;--theme-bg2:#e8eef3;--theme-side1:#365a78;--theme-side2:#162637;--theme-accent:#668aaa;--theme-gold:#d2b45e;--theme-text:#fff}
  [data-platform-theme="nightGold"]{--brand:#111827;--brand2:#0b1020;--dark:#050711;--theme-bg1:#fffdf7;--theme-bg2:#eee6d3;--theme-side1:#111827;--theme-side2:#050711;--theme-accent:#c49a3b;--theme-gold:#d7b65b;--theme-text:#fff}
  [data-platform-theme="mint"]{--brand:#3c806d;--brand2:#2a5f51;--dark:#183a30;--theme-bg1:#f6fffb;--theme-bg2:#e7f5ef;--theme-side1:#3c806d;--theme-side2:#183a30;--theme-accent:#7fc7ad;--theme-gold:#d6b65e;--theme-text:#fff}
}

@media screen{
  .feature-mini-list{
    display:grid;
    gap:10px;
    margin-top:10px;
  }
  .feature-mini-item{
    border:1px solid color-mix(in srgb,var(--brand) 18%,#d8e4df);
    border-radius:14px;
    padding:12px 14px;
    background:linear-gradient(145deg,#fff,#f6fbfa);
    box-shadow:0 10px 22px rgba(13,76,60,.08),inset 0 1px 0 rgba(255,255,255,.9);
  }
  .feature-mini-item b{
    display:block;
    color:var(--brand);
    font-size:15px;
    line-height:1.45;
  }
  .feature-mini-item small{
    display:block;
    margin-top:4px;
    color:var(--muted);
    font-size:12px;
    line-height:1.55;
  }
  .feature-checkline{
    min-height:56px;
    display:flex;
    align-items:center;
    gap:10px;
    padding:12px 14px;
    border:1px solid #d8e4df;
    border-radius:14px;
    background:linear-gradient(145deg,#fff,#f7fbfa);
    color:var(--brand);
    font-weight:900;
  }
  #waterBillsView input[type="month"],
  #waterBillsView input[type="file"],
  #waterBillsView input[type="number"],
  #independentInvoicesView input[type="number"],
  #independentInvoicesView input[type="text"],
  #independentInvoiceFollowView input[type="number"]{
    min-height:56px!important;
    border-radius:16px!important;
    border:1px solid color-mix(in srgb,var(--brand) 20%,#d8e4df)!important;
    background:linear-gradient(145deg,#fff,#f7fbfa)!important;
    box-shadow:inset 0 1px 0 #fff,0 12px 24px rgba(13,76,60,.08)!important;
    color:var(--brand)!important;
    font-size:18px!important;
    font-weight:900!important;
  }
  #waterBillsView input[type="file"]::file-selector-button{
    margin-inline-end:10px;
    border:1px solid color-mix(in srgb,var(--brand) 25%,#d8e4df);
    border-radius:12px;
    background:linear-gradient(145deg,#fffaf0,#fff);
    color:var(--brand);
    font-weight:900;
    padding:8px 12px;
    cursor:pointer;
  }
  #ownersTable .icon-btn,
  #ownersView .icon-btn{
    min-width:70px!important;
    min-height:48px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    white-space:normal!important;
    line-height:1.2!important;
    font-size:13px!important;
    font-weight:900!important;
    color:var(--brand)!important;
  }
  #ownersTable .icon-btn.red,
  #ownersView .icon-btn.red{
    color:#b91c1c!important;
  }
  #ownersTable .owner-subline,
  #ownersView .owner-subline{
    display:none!important;
  }
  .water-history-actions{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    align-items:stretch;
    justify-content:flex-start;
    margin-top:10px;
  }
  .water-history-actions select,
  .water-history-actions input{
    min-height:44px;
    border:1px solid color-mix(in srgb,var(--brand) 20%,#d8e4df);
    border-radius:13px;
    background:linear-gradient(145deg,#fff,#f7fbfa);
    color:var(--brand);
    font-weight:900;
    padding:8px 12px;
    box-shadow:inset 0 1px 0 #fff,0 8px 18px rgba(13,76,60,.07);
  }
  .water-history-actions select{
    flex:1 1 220px;
    max-width:360px;
  }
  .water-history-actions input{
    flex:0 1 130px;
  }
  .sidebar-order-list{
    display:grid;
    gap:8px;
    margin-top:10px;
  }
  .sidebar-order-item{
    width:100%;
    min-height:52px;
    border:1px solid color-mix(in srgb,var(--brand) 22%,#d8e4df);
    border-radius:15px;
    background:linear-gradient(145deg,#fff,#f7fbfa);
    color:var(--brand);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:10px 14px;
    cursor:grab;
    box-shadow:inset 0 1px 0 #fff,0 10px 20px rgba(13,76,60,.08);
    font-weight:900;
    text-align:right;
  }
  .sidebar-order-item:active{
    cursor:grabbing;
  }
  .sidebar-order-item.dragging{
    opacity:.62;
    transform:scale(.99);
  }
  .sidebar-order-item small{
    color:var(--muted);
    font-size:11px;
    font-weight:800;
    white-space:nowrap;
  }
}

@media screen and (max-width:900px){
  .feature-period-compact{
    align-items:stretch;
  }
  .feature-period-compact > *{
    flex:1 1 180px;
  }
  .water-image-review{
    grid-template-columns:110px 1fr;
  }
  .water-image-review strong{
    grid-column:1/-1;
  }
  .water-image-review img{
    width:110px;
  }
}

@media screen and (max-width:700px){
  .sync-warning-bar{
    left:10px!important;
    bottom:10px!important;
    width:calc(100vw - 20px)!important;
  }
  .feature-period-compact,
  .feature-action-strip,
  .archive-card-head{
    flex-direction:column;
    align-items:stretch;
  }
  .date-chip,
  .feature-period-compact > *,
  .feature-action-strip > *,
  .archive-card-head > *{
    width:100%!important;
    max-width:100%!important;
  }
  .water-image-review{
    grid-template-columns:1fr;
  }
  .water-image-review img{
    width:100%;
    max-height:260px;
    aspect-ratio:auto;
  }

  html,
  body,
  .app,
  .content,
  .view,
  .panel{
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }

  body{
    overflow-x:hidden!important;
  }

  .content{
    padding-left:10px!important;
    padding-right:10px!important;
  }

  .panel{
    overflow:hidden!important;
  }

  .table-wrap{
    width:100%!important;
    max-width:100%!important;
    overflow-x:auto!important;
    overflow-y:visible!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior-x:contain!important;
  }

  .table-wrap table{
    width:max-content!important;
    max-width:none!important;
  }

  .feature-period-panel{
    padding:10px!important;
    overflow:hidden!important;
  }

  .feature-period-compact{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
    align-items:stretch!important;
  }

  .feature-period-compact .date-chip,
  .feature-period-compact .btn{
    width:100%!important;
    max-width:100%!important;
    min-height:46px!important;
    height:auto!important;
    padding:9px 12px!important;
    border-radius:14px!important;
    font-size:15px!important;
    line-height:1.35!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
  }

  .feature-period-compact .date-chip{
    justify-content:space-between!important;
  }

  .feature-period-compact .date-chip input{
    width:100%!important;
    max-width:180px!important;
    min-height:28px!important;
    font-size:14px!important;
  }
}

@media screen and (min-width:701px) and (max-width:1180px){
  html body #appShell.app{
    display:grid!important;
    grid-template-columns:clamp(210px,26vw,250px) minmax(0,1fr)!important;
    align-items:start!important;
    width:100%!important;
    min-width:0!important;
  }

  html body #appShell > .sidebar{
    position:sticky!important;
    top:0!important;
    width:auto!important;
    max-width:none!important;
    height:100vh!important;
    max-height:100vh!important;
    padding:15px 12px!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
  }

  html body #appShell > .sidebar .nav,
  html body #appShell > .sidebar .dashboard-subnav{
    display:grid!important;
    grid-template-columns:1fr!important;
  }

  html body #appShell > .content{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    padding:20px clamp(12px,2vw,22px)!important;
  }

  html body #appShell .royal-home-hero{
    grid-template-columns:1fr!important;
  }

  html body #appShell .royal-hero-copy,
  html body #appShell .royal-hero-time{
    grid-column:1!important;
  }

  html body #appShell .royal-hero-copy{
    order:-1;
    text-align:center;
  }

  html body #appShell .royal-hero-time{
    width:100%;
    max-width:100%;
    grid-template-columns:minmax(95px,1fr) minmax(160px,1.45fr) minmax(95px,1fr);
    gap:8px;
  }
}

/* Keep tablet layouts balanced without falling back to mobile stacking. */
@media screen and (min-width:701px) and (max-width:1180px){
  html body #appShell.app{
    grid-template-columns:clamp(190px,22vw,220px) minmax(0,1fr)!important;
  }

  html body #appShell > .sidebar{
    position:sticky!important;
    top:0!important;
    width:auto!important;
    height:100vh!important;
    max-height:100vh!important;
    padding:15px 12px!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
  }

  html body #appShell > .sidebar .nav,
  html body #appShell > .sidebar .dashboard-subnav{
    grid-template-columns:1fr!important;
  }

  html body #appShell > .content{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }

  html body #appShell .associations-overview{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media screen and (min-width:901px) and (max-width:1180px){
  html body #appShell .associations-overview{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}

/* y5 structured entity selectors: final override after feature theme rules */
.lux-select-menu{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable;
}
.lux-option{
  justify-content:space-between!important;
  text-align:right!important;
  gap:12px!important;
}
.lux-option-copy{
  align-items:flex-start!important;
  text-align:right!important;
  min-width:0!important;
}
.lux-option-primary,.lux-option-secondary{
  text-align:right!important;
}
.lux-option-secondary{
  font-size:11px!important;
  font-weight:750!important;
}
.lux-option-status{
  font-size:10px!important;
}
.lux-select.association-select .lux-select-menu,
.lux-select.invoice-select .lux-select-menu,
.lux-select.name-select .lux-select-menu{
  max-height:min(420px,62vh)!important;
}

/* Partial owner import review: explicit row decisions, RTL-safe and mobile scrollable. */
.owner-import-blank-note{
  margin:10px 0;
  padding:10px 12px;
  border:1px solid #c8ddd6;
  border-radius:10px;
  background:#f2faf7;
  color:#315f55;
  font-size:12px;
  line-height:1.7;
}
.owner-import-summary{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:8px 0;
}
.owner-import-summary span{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:5px 8px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:var(--muted);
  font-size:10px;
}
.owner-import-mode-issue,.owner-import-reason{
  display:block;
  color:#9f2929;
  font-weight:800;
}
.owner-import-mode-issue{
  margin:8px 0;
  padding:8px 10px;
  border-radius:9px;
  background:#fff0f0;
  font-size:11px;
}
.owner-import-preview-rows{
  display:grid;
  gap:8px;
  max-height:360px;
  overflow:auto;
  overscroll-behavior:contain;
  padding-inline-end:3px;
}
.owner-import-preview-row{
  min-width:0;
  padding:9px 10px;
  border:1px solid var(--line);
  border-inline-start:4px solid #8da49d;
  border-radius:10px;
  background:#fff;
}
.owner-import-preview-row.status-add{border-inline-start-color:#16875f}
.owner-import-preview-row.status-update{border-inline-start-color:#226fbd}
.owner-import-preview-row.status-conflict,.owner-import-preview-row.status-ambiguous,.owner-import-preview-row.status-invalid{border-inline-start-color:#b83434;background:#fffafa}
.owner-import-row-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
}
.owner-import-row-head>b{overflow-wrap:anywhere}
.owner-import-status{
  flex:0 0 auto;
  direction:ltr;
  padding:3px 7px;
  border-radius:999px;
  background:#edf4f1;
  color:#264d43;
  font-size:9px;
  font-weight:900;
}
.owner-import-fields{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:7px;
}
.owner-import-field,.owner-import-no-change{
  max-width:100%;
  padding:4px 7px;
  border-radius:7px;
  background:#f3f7f6;
  color:#536a64;
  font-size:10px;
  overflow-wrap:anywhere;
}
.owner-import-reason{margin-top:7px;font-size:10px;line-height:1.6}
#associationSubmit:disabled{
  cursor:not-allowed!important;
  opacity:.48!important;
  filter:grayscale(.35);
  box-shadow:none!important;
}
@media(max-width:520px){
  .owner-import-preview-rows{max-height:300px}
  .owner-import-row-head{align-items:flex-start}
  .owner-import-fields{display:grid;grid-template-columns:1fr}
  .owner-import-field,.owner-import-no-change{width:100%}
}
/* V63 annual issuance: invoice-local distribution, preserved drafts, and issued financial lock. */
.annual-issue-panel .panel-body{overflow:visible}
.annual-issue-fields{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:12px;align-items:end}
.annual-issue-fields .field{min-width:0;margin:0}
.annual-issue-fields .field:first-child{grid-column:1/-1}
.annual-issue-fields small,.annual-allowed-edit-fields small{display:block;margin-top:5px;color:var(--muted);font-size:10px;line-height:1.6}
.annual-issue-notice,.annual-missing-areas,.annual-issue-summary,.annual-fee-draft-preview{margin-top:12px;border:1px solid #c9ddd6;border-radius:12px;padding:11px 12px;background:#f3faf7;color:#315f55;font-size:12px;line-height:1.75;overflow-wrap:anywhere}
.annual-issue-notice.is-draft{border-color:#d9c78e;background:#fff9e9;color:#6d581d}
.annual-issue-notice.is-error,.annual-issue-summary.is-error{border-color:#e3b1b1;background:#fff3f3;color:#922f2f}
.annual-missing-areas{border-color:#dfaaaa;background:#fff3f3;color:#8d2929}
.annual-missing-areas ul{margin:7px 0 0;padding-inline-start:22px;columns:2;column-gap:24px}
.annual-missing-areas li{break-inside:avoid;margin:2px 0}
.annual-fee-expected{margin-top:12px;border:1px solid #b9d3ca;border-radius:11px;padding:10px 12px;background:#edf7f3;color:#164f43;font-size:13px;font-weight:900;line-height:1.6}
.annual-fee-expected.is-error{border-color:#e1c2a5;background:#fff8ed;color:#7a541e;font-weight:800}
.annual-issue-summary{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.annual-issue-summary b,.annual-issue-summary span{display:block}
.annual-issue-summary span{text-align:left}
.annual-preview-button{width:100%;margin-top:12px;min-height:44px}
.annual-preview-button:disabled,#confirmAnnualFee:disabled,#annualEditSaveButton:disabled{cursor:not-allowed!important;opacity:.52!important;filter:grayscale(.3);box-shadow:none!important}
.annual-draft-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px}
.annual-draft-head span{color:var(--muted);font-size:10px}
.annual-draft-table-wrap{max-height:260px;overflow:auto;overscroll-behavior:contain}
.annual-draft-table-wrap table{min-width:650px}
.annual-draft-blank{display:inline-block;color:#a02c2c;font-weight:900;white-space:normal}
.annual-issue-preview-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:14px}
.annual-issue-preview-meta>div{min-width:0;border:1px solid #d7e2de;border-radius:11px;padding:9px 10px;background:#f8fbfa}
.annual-issue-preview-meta small,.annual-issue-preview-meta b{display:block;overflow-wrap:anywhere}
.annual-issue-preview-meta small{color:var(--muted);font-size:9px;margin-bottom:3px}
.annual-issue-preview-meta b{color:#164f43;font-size:12px;line-height:1.55}
.annual-issue-preview-table{max-height:420px;overflow:auto;overscroll-behavior:contain}
.annual-issue-preview-table table{min-width:780px}
.annual-print-preview-details{margin-top:14px;border:1px solid #d6e2de;border-radius:11px;background:#fff;overflow:hidden}
.annual-print-preview-details summary{cursor:pointer;padding:11px 13px;color:#315f55;font-size:12px;font-weight:900;list-style-position:inside}
.annual-print-preview-details[open] summary{border-bottom:1px solid #d6e2de;background:#f5faf8}
.annual-financial-lock-notice{display:block!important;margin-bottom:13px!important;border:1px solid #d9c47d!important;background:#fff8df!important;color:#685416!important;font-weight:800!important;line-height:1.8!important}
.annual-allowed-edit-fields{margin-bottom:13px}
.annual-locked-section{border:1px solid #d9e1de;border-radius:13px;padding:12px;background:#f4f7f6}
.annual-lock-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px;color:#49645d}
.annual-lock-heading b{color:#174f43}
.annual-lock-heading span{font-size:10px;line-height:1.6;text-align:left}
.annual-locked-section input:disabled,.annual-locked-section select:disabled{opacity:.78!important;color:#56645f!important;background:#e7ecea!important;border-color:#d2dbd8!important;cursor:not-allowed!important}
.annual-issued-title{margin:0 0 14px;color:#174f43;font-size:20px;text-align:center}
@media(max-width:700px){
  .annual-issue-fields,.annual-issue-preview-meta{grid-template-columns:1fr}
  .annual-issue-fields .field:first-child{grid-column:auto}
  .annual-missing-areas ul{columns:1}
  .annual-issue-summary,.annual-draft-head,.annual-lock-heading{display:block}
  .annual-issue-summary span,.annual-lock-heading span{text-align:right;margin-top:4px}
  .annual-fee-preview-card,.annual-issued-edit-card{width:100%!important;max-width:100%!important;max-height:calc(100dvh - 16px)!important;margin:0!important}
  .annual-fee-preview-card .modal-body,.annual-issued-edit-card .modal-body{overflow:auto!important;overscroll-behavior:contain}
  .annual-fee-preview-card .modal-actions-footer{position:sticky;bottom:0;z-index:4;background:#fff;border-top:1px solid #dce5e1;flex-wrap:wrap}
  .annual-fee-preview-card .modal-actions-footer .btn{flex:1 1 130px}
}
@media screen{
  #annualInvoiceModal.annual-archive-preview-modal .modal-card{
    width:100%!important;
    max-width:1500px!important;
    margin:0!important;
  }
}

/* V64: explicit annual due date, live reconciliation and full-width preview */
.annual-due-date-field{margin:14px 0;padding:14px;border:1px solid color-mix(in srgb,var(--brand) 24%,#d9e4e0);border-radius:15px;background:linear-gradient(145deg,#fff,color-mix(in srgb,var(--theme-bg1,#f5faf8) 82%,#fff));box-shadow:0 10px 26px rgba(14,62,55,.07)}
.annual-due-display{font-weight:950;letter-spacing:.04em;direction:ltr;text-align:center;background:#f7faf9!important;color:var(--brand)!important}
.annual-due-display::placeholder{color:#71827d;opacity:1}
.annual-date-picker{display:grid;grid-template-columns:minmax(88px,.72fr) minmax(150px,1.35fr) minmax(105px,.9fr);gap:9px;margin-top:9px;direction:rtl}
.annual-date-picker select{min-width:0;font-weight:850;text-align:center}
.annual-due-weekday{display:block;margin-top:8px;color:var(--brand);font-weight:950;min-height:1.5em}
.annual-due-date-field>small:last-child{display:block;margin-top:3px;color:var(--muted);line-height:1.7}
.annual-fee-expected{padding:0!important;background:transparent!important;border:0!important}
.annual-live-total-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:12px 14px;border-radius:14px 14px 0 0;background:linear-gradient(135deg,var(--brand),var(--brand2));color:#fff}
.annual-live-total-head b,.annual-live-total-head span{display:block}.annual-live-total-head span{font-size:11px;line-height:1.7;text-align:left;opacity:.9}
.annual-live-total-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr));gap:8px;padding:11px;border:1px solid #d5e2de;border-top:0;border-radius:0 0 14px 14px;background:#fff;overflow:visible}
.annual-live-total-grid>div{min-width:0;padding:10px;border:1px solid #dce6e2;border-radius:11px;background:#f7faf9}
.annual-live-total-grid small,.annual-live-total-grid b{display:block}.annual-live-total-grid small{color:var(--muted);font-size:10px;min-height:2.7em}.annual-live-total-grid b{margin-top:4px;color:#144f44;line-height:1.5}
.annual-fee-expected.is-error .annual-live-total-head{background:linear-gradient(135deg,#8f3035,#ba4350)}
.annual-live-warning{margin-top:7px;padding:9px 11px;border:1px solid #e9c7ca;border-radius:10px;background:#fff2f3;color:#852f38;font-weight:850;line-height:1.7}
.annual-fee-preview-card{width:min(1540px,100%)!important;max-width:1540px!important}
#annualFeePreview{overflow:visible!important}.annual-issue-preview-meta{grid-template-columns:repeat(6,minmax(145px,1fr))!important}
.annual-issue-preview-table{max-height:min(48vh,520px)!important;border:1px solid #d6e2de;border-radius:13px;background:#fff}
.annual-issue-preview-table table{min-width:1180px!important;table-layout:fixed}.annual-issue-preview-table th{position:sticky;top:0;z-index:2;white-space:normal;line-height:1.45}.annual-issue-preview-table td{vertical-align:middle;white-space:normal}.annual-preview-owner{font-weight:950;color:#154e43;overflow-wrap:anywhere}
.annual-preview-reconciliation{display:grid;grid-template-columns:repeat(5,minmax(145px,1fr));gap:8px;margin-top:12px}
.annual-preview-reconciliation>div{padding:11px;border:1px solid #d9e4e0;border-radius:11px;background:#f7faf9}.annual-preview-reconciliation small,.annual-preview-reconciliation b{display:block}.annual-preview-reconciliation small{color:var(--muted);font-size:10px}.annual-preview-reconciliation b{margin-top:4px;color:#164f43}.annual-preview-reconciliation .is-match{border-color:#9cd1b5;background:#effaf4}.annual-preview-reconciliation .is-error{border-color:#e6aeb4;background:#fff0f2}.annual-preview-reconciliation .is-error b{color:#9c303b}
.electronic-issue-footer{margin-top:12px;padding-top:9px;border-top:1px solid #d7e2de;color:#315f59;font-size:10px;font-weight:850;line-height:1.7}

/* V64: stable owner rows and independent current/archive invoice logs */
.lux-select.name-select .lux-option{display:grid!important;grid-template-columns:minmax(0,1fr) 24px!important;align-items:center!important;gap:8px!important;min-height:50px!important}.lux-select.name-select .lux-option-copy{min-width:0}.lux-select.name-select .lux-option-primary{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lux-select.name-select .lux-option-check{display:grid;place-items:center;width:24px;height:24px;font-size:16px;font-weight:950}
.annual-log-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px;padding:5px;border:1px solid #d7e2de;border-radius:14px;background:#f4f8f7}.annual-log-tabs .btn{flex:1 1 180px;min-height:46px}.annual-log-tabs .btn.active{background:linear-gradient(135deg,#0b2f74,#174fa8)!important;border-color:var(--theme-gold,#d8b653)!important;color:#fff!important;box-shadow:0 10px 22px color-mix(in srgb,var(--brand) 25%,transparent),inset 0 -3px var(--theme-gold,#d8b653)!important}.annual-log-controls{align-items:end}.annual-log-table table{min-width:1640px;table-layout:fixed}.annual-log-table th{white-space:nowrap}.annual-log-table th:nth-child(1){width:240px}.annual-log-table th:nth-child(2){width:190px}.annual-log-table th:nth-child(3),.annual-log-table th:nth-child(4){width:245px}.annual-log-table th:nth-child(5){width:205px}.annual-log-table th:nth-child(6){width:135px}.annual-log-table th:nth-child(7){width:105px}.annual-log-table th:nth-child(8){width:360px}.annual-log-table td{vertical-align:top;line-height:1.7;overflow-wrap:anywhere}.annual-log-table td:nth-child(3),.annual-log-table td:nth-child(4){direction:rtl;white-space:nowrap}.annual-log-table .invoice-record-actions{min-width:330px;flex-wrap:wrap}

/* V64: clock and date cards visibly follow every selected platform theme */
html[data-platform-theme] .royal-date-card,html[data-platform-theme] .royal-clock-card{background:linear-gradient(145deg,color-mix(in srgb,var(--theme-accent) 78%,white 9%),color-mix(in srgb,var(--theme-side2) 92%,black 8%))!important;border-color:color-mix(in srgb,var(--theme-gold) 55%,white 14%)!important;box-shadow:inset 0 1px rgba(255,255,255,.24),0 18px 38px color-mix(in srgb,var(--theme-side2) 35%,transparent)!important}
html[data-platform-theme] .royal-clock-card{box-shadow:inset 0 1px rgba(255,255,255,.28),0 20px 44px color-mix(in srgb,var(--theme-side2) 42%,transparent),0 0 24px color-mix(in srgb,var(--theme-accent) 35%,transparent)!important}
html[data-platform-theme] .royal-date-icon,html[data-platform-theme] .royal-calendar-icon,html[data-platform-theme] .royal-clock-icon{border-color:var(--theme-gold)!important;filter:drop-shadow(0 0 8px color-mix(in srgb,var(--theme-gold) 40%,transparent))}html[data-platform-theme] .royal-date-icon:before,html[data-platform-theme] .royal-date-icon:after{border-color:var(--theme-gold)!important}html[data-platform-theme] .royal-calendar-icon:before{border-color:var(--theme-gold)!important}html[data-platform-theme] .royal-calendar-icon:after{background:linear-gradient(90deg,var(--theme-gold) 20%,transparent 20% 40%,var(--theme-gold) 40% 60%,transparent 60% 80%,var(--theme-gold) 80%)!important}html[data-platform-theme] .royal-clock-icon:before,html[data-platform-theme] .royal-clock-icon:after,html[data-platform-theme] .royal-clock-icon i{background:var(--theme-gold)!important}

@media(max-width:980px){.annual-issue-preview-meta{grid-template-columns:repeat(3,minmax(140px,1fr))!important}.annual-preview-reconciliation,.annual-live-total-grid{grid-template-columns:repeat(2,minmax(138px,1fr))}}
@media(max-width:620px){.annual-date-picker,.annual-issue-preview-meta,.annual-preview-reconciliation,.annual-live-total-grid{grid-template-columns:1fr!important}.annual-live-total-head{display:block}.annual-live-total-head span{text-align:right;margin-top:4px}.annual-fee-preview-card{width:100%!important}.annual-log-tabs .btn{flex-basis:100%}}
@media print{.annual-issue-preview-table{max-height:none!important;overflow:visible!important}.annual-issue-preview-table th{position:static!important}.annual-preview-reconciliation{break-inside:avoid;page-break-inside:avoid}.annual-log-tabs{display:none!important}}

/* v66 — water invoice reading editor (previous/current readings, owner & unit locked) */
.water-edit-card{max-height:88vh;display:flex;flex-direction:column}
.water-edit-card .modal-body{overflow:auto;min-height:0}
.water-edit-readings-wrap{margin-top:10px;max-height:min(300px,34vh);overflow:auto;border:1px solid #d8e4df;border-radius:12px}
.water-edit-readings-table{width:100%;border-collapse:collapse;font-size:13px}
.water-edit-readings-table th{background:#0d4c3c;color:#fff;padding:8px 7px;font-size:12px;position:sticky;top:0;z-index:1}
.water-edit-readings-table td{padding:6px 7px;border-bottom:1px solid #e6ede9;color:#1c332f;vertical-align:middle}
.water-edit-readings-table .owner-display-name{font-weight:800;color:#123f3b}
.water-edit-readings-table input.water-edit-reading{width:100%;min-height:38px;text-align:left;direction:ltr;font-weight:700}
.water-edit-readings-table td[data-water-edit-usage]{direction:ltr;text-align:left;font-weight:800;color:#0d4c3c;white-space:nowrap}
.water-edit-usage-summary{margin-top:10px;border:1px solid #b9d3ca;border-radius:11px;padding:10px 12px;background:#edf7f3;color:#164f43;font-size:12.5px;font-weight:800;line-height:1.6}
