@media screen{
  .control-hub-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:14px;
  }

  .control-hub-card,
  .monthly-card{
    border:1px solid color-mix(in srgb,var(--brand) 18%,#d8e4df);
    border-radius:18px;
    background:linear-gradient(145deg,#ffffff,#f6fbfa);
    box-shadow:inset 0 1px 0 #fff,0 18px 38px rgba(13,76,60,.10);
    padding:18px;
  }

  .control-hub-card{
    min-height:135px;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    gap:12px;
  }

  .control-hub-card > div{
    display:flex;
    min-width:0;
    flex-direction:column;
    gap:8px;
  }

  .control-hub-card b,
  .monthly-card h3{
    display:block;
    color:var(--brand);
    font-size:18px;
    font-weight:900;
    line-height:1.45;
    margin:0;
    white-space:normal;
  }

  .control-hub-card small,
  .monthly-note{
    display:block;
    color:var(--muted);
    font-size:12px;
    line-height:1.7;
    font-weight:800;
    white-space:normal;
  }

  .monthly-layout{
    display:grid;
    gap:16px;
  }

  .monthly-controls{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
    gap:12px;
    align-items:end;
  }

  .monthly-controls .field{
    margin:0;
  }

  .monthly-controls input,
  .monthly-controls select{
    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:17px!important;
    font-weight:900!important;
  }

  .monthly-controls select{
    padding-inline:18px!important;
    background:linear-gradient(145deg,#fff,#f7fbfa)!important;
    cursor:pointer;
  }

  .monthly-controls select.monthly-native-hidden{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    opacity:0!important;
    pointer-events:none!important;
  }

  .monthly-lux-select{
    position:relative;
    width:100%;
  }

  .monthly-lux-button{
    width:100%;
    min-height:56px;
    border:1px solid color-mix(in srgb,var(--brand) 20%,#d8e4df);
    border-radius:16px;
    background:linear-gradient(145deg,#fff,#f7fbfa);
    box-shadow:inset 0 1px 0 #fff,0 12px 24px rgba(13,76,60,.08);
    color:var(--brand);
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:10px 16px;
    font-size:17px;
    font-weight:900;
    text-align:right;
  }

  .monthly-lux-button::before{
    content:"⌄";
    color:var(--brand);
    font-size:22px;
    line-height:1;
  }

  .monthly-lux-select.open .monthly-lux-button{
    border-color:color-mix(in srgb,var(--brand) 62%,#d8b653);
    box-shadow:inset 0 1px 0 #fff,0 0 0 4px color-mix(in srgb,var(--brand) 13%,transparent),0 15px 30px rgba(13,76,60,.11);
  }

  .monthly-lux-menu{
    position:absolute;
    z-index:50;
    inset-inline:0;
    top:calc(100% + 8px);
    max-height:320px;
    overflow:auto;
    border:1px solid color-mix(in srgb,var(--brand) 20%,#d8e4df);
    border-radius:18px;
    background:#fff;
    box-shadow:0 22px 46px rgba(13,76,60,.18);
    padding:8px;
    display:none;
  }

  .monthly-lux-select.open .monthly-lux-menu{
    display:block;
  }

  .monthly-lux-option{
    width:100%;
    border:0;
    border-radius:13px;
    background:transparent;
    color:var(--brand);
    cursor:pointer;
    padding:11px 12px;
    text-align:right;
    font-size:16px;
    font-weight:900;
    line-height:1.55;
  }

  .monthly-lux-option:hover,
  .monthly-lux-option.active{
    background:linear-gradient(145deg,var(--brand),color-mix(in srgb,var(--brand) 80%,white));
    color:#fff;
  }

  .monthly-controls select:focus,
  .monthly-controls input:focus{
    outline:none!important;
    border-color:color-mix(in srgb,var(--brand) 62%,#d8b653)!important;
    box-shadow:inset 0 1px 0 #fff,0 0 0 4px color-mix(in srgb,var(--brand) 13%,transparent),0 15px 30px rgba(13,76,60,.11)!important;
  }

  .monthly-controls 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;
  }

  .monthly-filter-row{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
  }

  .monthly-filter-row .btn.active{
    background:linear-gradient(145deg,var(--brand),color-mix(in srgb,var(--brand) 82%,white));
    color:#fff;
    border-color:color-mix(in srgb,var(--brand) 80%,#d8b653);
  }

  .monthly-summary{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(145px,1fr));
    gap:10px;
  }

  .monthly-summary article{
    border:1px solid #dbe8e4;
    border-radius:16px;
    background:linear-gradient(145deg,#fff,#f2f8f6);
    padding:14px;
    box-shadow:inset 0 1px 0 #fff,0 10px 22px rgba(13,76,60,.07);
  }

  .monthly-summary span{
    display:block;
    color:var(--muted);
    font-size:12px;
    font-weight:800;
  }

  .monthly-summary b{
    display:block;
    margin-top:5px;
    color:var(--brand);
    font-size:24px;
    font-weight:900;
  }

  .monthly-status{
    display:inline-flex;
    min-width:86px;
    justify-content:center;
    border-radius:999px;
    padding:6px 10px;
    font-size:12px;
    font-weight:900;
    border:1px solid transparent;
  }

  .monthly-status.paid{
    color:#08763c;
    background:#e9f8ef;
    border-color:#bce7cc;
  }

  .monthly-status.unpaid{
    color:#b42318;
    background:#fff1f1;
    border-color:#f1b7b7;
  }

  .monthly-status.pending{
    color:#a05a00;
    background:#fff7e6;
    border-color:#f1d59a;
  }

  .monthly-status.inactive{
    color:#667085;
    background:#f2f4f7;
    border-color:#d0d5dd;
  }

  .monthly-row-actions{
    display:flex;
    gap:7px;
    justify-content:center;
    flex-wrap:wrap;
  }

  .monthly-import-log,
  .monthly-months{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:12px;
  }

  .monthly-import-log article{
    flex:1 1 230px;
    border:1px solid #dbe8e4;
    border-radius:16px;
    background:linear-gradient(145deg,#fff,#f7fbfa);
    padding:13px;
    box-shadow:inset 0 1px 0 #fff,0 10px 22px rgba(13,76,60,.07);
  }

  .monthly-import-log b,
  .monthly-import-log span{
    display:block;
  }

  .monthly-import-log span{
    margin-top:5px;
    color:var(--muted);
    font-size:12px;
    font-weight:800;
  }

  .month-chip{
    border:1px solid color-mix(in srgb,var(--brand) 22%,#d8e4df);
    border-radius:999px;
    background:linear-gradient(145deg,#fff,#f7fbfa);
    color:var(--brand);
    cursor:pointer;
    font-weight:900;
    padding:9px 14px;
    box-shadow:inset 0 1px 0 #fff,0 10px 20px rgba(13,76,60,.07);
  }

  .month-chip.active{
    background:linear-gradient(145deg,var(--brand),color-mix(in srgb,var(--brand) 76%,white));
    color:#fff;
    border-color:color-mix(in srgb,var(--brand) 75%,#d8b653);
  }

  .monthly-association-board{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
    gap:12px;
  }

  .monthly-association-card{
    border:1px solid #dbe8e4;
    border-radius:18px;
    background:
      radial-gradient(circle at 14% 12%,rgba(255,255,255,.95),transparent 35%),
      linear-gradient(145deg,#fff,#f6fbfa);
    padding:14px;
    box-shadow:inset 0 1px 0 #fff,0 14px 28px rgba(13,76,60,.08);
  }

  .monthly-association-title{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
    margin-bottom:10px;
  }

  .monthly-association-card h4{
    margin:0;
    color:var(--brand);
    font-size:17px;
    line-height:1.5;
  }

  .monthly-association-stats{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:7px;
    margin:10px 0;
  }

  .monthly-association-stats span{
    border-radius:12px;
    background:#eef7f4;
    color:var(--muted);
    padding:8px 6px;
    text-align:center;
    font-size:11px;
    font-weight:800;
  }

  .monthly-association-stats b{
    display:block;
    color:var(--brand);
    font-size:17px;
    margin-top:3px;
  }

  .monthly-association-card p{
    margin:8px 0 0;
    color:var(--muted);
    font-size:12px;
    font-weight:800;
    line-height:1.7;
  }

  .monthly-empty{
    border:1px dashed #cadbd6;
    border-radius:16px;
    padding:20px;
    text-align:center;
    color:var(--muted);
    font-weight:900;
    background:#fbfdfc;
  }

  .monthly-reminder-modal{
    position:fixed;
    inset:0;
    z-index:9999;
    display:grid;
    place-items:center;
    padding:18px;
    background:rgba(5,32,27,.28);
    backdrop-filter:blur(4px);
  }

  .monthly-reminder-modal.hidden{
    display:none!important;
  }

  .monthly-reminder-box{
    width:min(460px,100%);
    border:1px solid color-mix(in srgb,var(--brand) 18%,#d8e4df);
    border-radius:22px;
    background:linear-gradient(145deg,#fff,#f7fbfa);
    box-shadow:inset 0 1px 0 #fff,0 28px 70px rgba(13,76,60,.22);
    padding:22px;
    text-align:right;
  }

  .monthly-reminder-box h3{
    margin:0;
    color:var(--brand);
    font-size:21px;
    font-weight:900;
  }

  .monthly-reminder-box p{
    margin:12px 0 18px;
    color:var(--muted);
    line-height:1.7;
    font-weight:800;
  }
}

.monthly-board-filter-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:12px 0;
}

.monthly-board-filter-row .btn.active{
  background:linear-gradient(145deg,#fffaf0,#f7e9bd)!important;
  border-color:var(--gold,#d8b653)!important;
  color:var(--ink,#073b34)!important;
  box-shadow:0 10px 22px rgba(18,58,52,.16), inset 0 1px 0 rgba(255,255,255,.9)!important;
}

.association-order-item{
  cursor:grab;
  user-select:none;
}

.association-order-item.dragging{
  opacity:.55;
}

.association-order-item.drag-over{
  outline:2px solid var(--gold,#d8b653);
  background:#fff8e7;
}

/* SAFE MONTHLY MOBILE OVERRIDE - must stay last, visual only */
@media screen and (max-width:700px){
  html,
  body,
  body:has(#monthlyFeesView:not(.hidden)) #appShell,
  body:has(#monthlyFeesView:not(.hidden)) .app,
  body:has(#monthlyFeesView:not(.hidden)) .content,
  #monthlyFeesView,
  #monthlyFeesView .panel,
  #monthlyFeesView .panel-head,
  #monthlyFeesView .panel-body,
  #monthlyFeesView .monthly-card,
  #monthlyFeesView .monthly-controls,
  #monthlyFeesView .monthly-summary,
  #monthlyFeesView .monthly-association-board,
  #monthlyFeesView .monthly-association-card{
    max-width:100vw!important;
    min-width:0!important;
    overflow-x:hidden!important;
    box-sizing:border-box!important;
  }

  #monthlyFeesView .monthly-filter-row{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow:visible!important;
    align-items:stretch!important;
  }

  #monthlyFeesView .monthly-filter-row > *,
  #monthlyFeesView .monthly-filter-row .btn,
  #monthlyFeesView #printMonthlyPeriodReport,
  #monthlyFeesView [data-monthly-filter]{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:42px!important;
    height:auto!important;
    padding:8px 6px!important;
    border-radius:12px!important;
    font-size:12.5px!important;
    line-height:1.25!important;
    white-space:normal!important;
    box-sizing:border-box!important;
  }

  #monthlyFeesView .feature-action-strip{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    width:100%!important;
    max-width:100%!important;
    overflow:visible!important;
  }

  #monthlyFeesView .feature-action-strip > *,
  #monthlyFeesView .feature-action-strip .btn{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:42px!important;
    height:auto!important;
    padding:8px 7px!important;
    font-size:13px!important;
    line-height:1.25!important;
    white-space:normal!important;
    box-sizing:border-box!important;
  }

  #monthlyFeesView .monthly-lux-menu{
    right:0!important;
    left:0!important;
    width:100%!important;
    max-width:100%!important;
    transform:none!important;
  }
}

@media screen and (max-width:700px){
  .control-hub-card,
  .monthly-card{
    padding:14px;
  }

  .monthly-filter-row,
  .monthly-row-actions{
    flex-direction:column;
  }

  .monthly-filter-row .btn,
  .monthly-row-actions .btn{
    width:100%;
  }

  #monthlyFeesView,
  #monthlyFeesView .panel-body,
  #monthlyFeesView .monthly-card,
  #monthlyFeesView .monthly-controls,
  #monthlyFeesView .feature-action-strip,
  #monthlyFeesView .monthly-summary,
  #monthlyFeesView .monthly-association-board,
  #monthlyFeesView .monthly-association-card,
  #monthlyFeesView .monthly-association-title,
  #monthlyFeesView .monthly-association-stats{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }

  #monthlyFeesView .monthly-controls,
  #monthlyFeesView .feature-action-strip,
  #monthlyFeesView .monthly-summary,
  #monthlyFeesView .monthly-association-board{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:10px!important;
  }

  #monthlyFeesView .monthly-association-stats{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }

  #monthlyFeesView .field,
  #monthlyFeesView .btn,
  #monthlyFeesView select,
  #monthlyFeesView input,
  #monthlyFeesView .monthly-lux-select,
  #monthlyFeesView .monthly-lux-button,
  #monthlyFeesView .feature-action-strip > *{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }

  #monthlyFeesView .monthly-lux-menu{
    right:0!important;
    left:0!important;
    width:100%!important;
    max-width:100%!important;
    transform:none!important;
  }

  #monthlyFeesView{
    overflow-x:hidden!important;
    contain:inline-size!important;
  }

  #monthlyFeesView .panel-head,
  #monthlyFeesView .panel-body{
    padding-left:10px!important;
    padding-right:10px!important;
  }

  #monthlyFeesView .monthly-filter-row{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
  }

  #monthlyFeesView .monthly-filter-row .btn,
  #monthlyFeesView #printMonthlyPeriodReport,
  #monthlyFeesView [data-monthly-filter]{
    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;
  }

  #monthlyFeesView .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;
  }

  #monthlyFeesView .table-wrap table{
    min-width:760px!important;
    width:max-content!important;
    max-width:none!important;
  }

  #monthlyReminderModal{
    width:100vw!important;
    max-width:100vw!important;
    overflow-x:hidden!important;
    box-sizing:border-box!important;
  }

  #monthlyReminderModal .monthly-reminder-box{
    width:calc(100vw - 28px)!important;
    max-width:calc(100vw - 28px)!important;
    box-sizing:border-box!important;
  }
}

/* SAFE MONTHLY MOBILE FINAL PATCH - visual only */
@media screen and (max-width:700px){
  body:has(#monthlyFeesView:not(.hidden)),
  body:has(#monthlyFeesView:not(.hidden)) #appShell,
  body:has(#monthlyFeesView:not(.hidden)) .app,
  body:has(#monthlyFeesView:not(.hidden)) .content{
    max-width:100vw!important;
    overflow-x:hidden!important;
  }

  #monthlyFeesView,
  #monthlyFeesView .panel,
  #monthlyFeesView .panel-head,
  #monthlyFeesView .panel-body,
  #monthlyFeesView .monthly-card{
    inline-size:100%!important;
    max-inline-size:100%!important;
    min-inline-size:0!important;
    overflow-x:clip!important;
    box-sizing:border-box!important;
  }

  #monthlyFeesView .monthly-controls,
  #monthlyFeesView .monthly-summary,
  #monthlyFeesView .monthly-association-board{
    inline-size:100%!important;
    max-inline-size:100%!important;
    min-inline-size:0!important;
    overflow-x:clip!important;
  }

  #monthlyFeesView .monthly-filter-row{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px!important;
    inline-size:100%!important;
    max-inline-size:100%!important;
    overflow:visible!important;
    align-items:stretch!important;
  }

  #monthlyFeesView .monthly-filter-row > *,
  #monthlyFeesView .monthly-filter-row .btn,
  #monthlyFeesView #printMonthlyPeriodReport,
  #monthlyFeesView [data-monthly-filter]{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:42px!important;
    padding:8px 6px!important;
    border-radius:12px!important;
    font-size:12.5px!important;
    line-height:1.25!important;
    white-space:normal!important;
    box-sizing:border-box!important;
  }

  #monthlyFeesView .feature-action-strip{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    inline-size:100%!important;
    max-inline-size:100%!important;
    overflow:visible!important;
  }

  #monthlyFeesView .feature-action-strip > *,
  #monthlyFeesView .feature-action-strip .btn{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:42px!important;
    padding:8px 7px!important;
    font-size:13px!important;
    line-height:1.25!important;
    white-space:normal!important;
    box-sizing:border-box!important;
  }

  #monthlyFeesView .monthly-controls{
    grid-template-columns:1fr!important;
  }

  #monthlyFeesView .monthly-lux-menu{
    right:0!important;
    left:0!important;
    width:100%!important;
    max-width:100%!important;
    transform:none!important;
  }
}

/* SAFE FINAL MOBILE FIT - visual layout only */
@media screen and (max-width:700px){
  html,
  body{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-x:hidden!important;
  }

  body{
    direction:ltr!important;
  }

  #appShell,
  .app{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-x:hidden!important;
    box-sizing:border-box!important;
    direction:ltr!important;
  }

  .content{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:12px 10px!important;
    overflow-x:hidden!important;
    box-sizing:border-box!important;
    direction:rtl!important;
  }

  .sidebar,
  .modal,
  .toast,
  .save-state,
  .login-screen{
    direction:rtl!important;
  }

  .view,
  .view:not(.hidden),
  .panel,
  .panel-head,
  .panel-body,
  .toolbar,
  .row-actions,
  .actions,
  .form-actions{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }

  .view,
  .panel,
  .panel-body{
    overflow-x:hidden!important;
  }

  .panel{
    margin-left:0!important;
    margin-right:0!important;
  }

  .top{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
    box-sizing:border-box!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;
  }

  #ownersView .panel-head > .row-actions,
  #ownersView .toolbar,
  #monthlyFeesView .monthly-controls,
  #monthlyFeesView .monthly-filter-row,
  #monthlyFeesView .feature-action-strip{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
    align-items:stretch!important;
  }

  #ownersView .panel-head > .row-actions > *,
  #ownersView .toolbar > *,
  #monthlyFeesView .monthly-controls > *,
  #monthlyFeesView .monthly-filter-row > *,
  #monthlyFeesView .feature-action-strip > *{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }

  #ownersView .panel-head > .row-actions .btn,
  #ownersView .toolbar .btn,
  #monthlyFeesView .monthly-filter-row .btn,
  #monthlyFeesView .feature-action-strip .btn,
  #monthlyFeesView [data-monthly-filter]{
    min-height:46px!important;
    height:auto!important;
    padding:9px 12px!important;
    border-radius:14px!important;
    font-size:15px!important;
    line-height:1.35!important;
  }
}

/* SAFE AUTH LOCK ABSOLUTE LAST - mobile login must not reveal app shell.
   Selectors are boosted (html body … #appShell.app) so responsive re-show rules like
   `html body #appShell.app{display:block/grid!important}` (base.css / features.css mobile
   blocks) can never win against the lock before login. */
html body.auth-locked #appShell.app,
body.auth-locked #appShell,
body.auth-locked .app,
html body #appShell.app.app-locked,
#appShell.app-locked,
.app.app-locked{
  display:none!important;
}

html body.auth-locked #loginScreen{
  display:grid!important;
}

@media screen and (max-width:700px){
  #monthlyFeesView .monthly-board-filter-row{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
  }

  #monthlyFeesView .monthly-board-filter-row > *,
  #monthlyFeesView .monthly-board-filter-row .btn{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:46px!important;
    box-sizing:border-box!important;
  }
}

/* SAFE MONTHLY FEES RESPONSIVE LOCK - prevents clipped mobile/tablet layout */
@media screen{
  html,
  body,
  #appShell,
  .app,
  .content,
  #monthlyFeesView{
    max-width:100%!important;
    overflow-x:hidden!important;
    box-sizing:border-box!important;
  }

  #monthlyFeesView,
  #monthlyFeesView .panel,
  #monthlyFeesView .panel-body,
  #monthlyFeesView .monthly-layout,
  #monthlyFeesView .monthly-card,
  #monthlyFeesView .monthly-controls,
  #monthlyFeesView .feature-action-strip,
  #monthlyFeesView .monthly-summary,
  #monthlyFeesView .monthly-board,
  #monthlyFeesView .monthly-board-grid,
  #monthlyFeesView .monthly-filter-row{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }

  #monthlyFeesView .monthly-card{
    margin-left:0!important;
    margin-right:0!important;
    overflow:hidden!important;
  }

  #monthlyFeesView .monthly-controls,
  #monthlyFeesView .feature-action-strip,
  #monthlyFeesView .monthly-summary{
    display:grid!important;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr))!important;
    gap:10px!important;
    align-items:stretch!important;
  }

  #monthlyFeesView .monthly-controls > *,
  #monthlyFeesView .feature-action-strip > *,
  #monthlyFeesView .monthly-summary > *,
  #monthlyFeesView input,
  #monthlyFeesView select,
  #monthlyFeesView button,
  #monthlyFeesView .btn,
  #monthlyFeesView .monthly-select-btn{
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }

  #monthlyFeesView select.monthly-native-hidden{
    position:absolute!important;
    inset:auto 0 auto auto!important;
    width:1px!important;
    max-width:1px!important;
    height:1px!important;
    opacity:0!important;
    overflow:hidden!important;
    pointer-events:none!important;
  }

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

  #monthlyFeesView .table-wrap table{
    min-width:760px!important;
    width:760px!important;
    max-width:none!important;
  }
}

@media screen and (max-width:700px){
  #monthlyFeesView .panel-head,
  #monthlyFeesView .panel-body{
    padding-left:10px!important;
    padding-right:10px!important;
  }

  #monthlyFeesView .monthly-card{
    border-radius:18px!important;
    padding-left:10px!important;
    padding-right:10px!important;
  }

  #monthlyFeesView .monthly-controls,
  #monthlyFeesView .feature-action-strip,
  #monthlyFeesView .monthly-summary,
  #monthlyFeesView .monthly-filter-row,
  #monthlyFeesView .monthly-board-filter-row{
    grid-template-columns:1fr!important;
  }

  #monthlyFeesView input,
  #monthlyFeesView button,
  #monthlyFeesView .btn,
  #monthlyFeesView .monthly-select-btn{
    width:100%!important;
    min-height:46px!important;
    padding:9px 12px!important;
    font-size:15px!important;
    line-height:1.35!important;
  }
}

/* v66 CONTRAST FIX (visual only) — strengthen monthly fees readability without changing layout/design */
.monthly-lux-button,.monthly-lux-option{color:#0d4c3c}
.monthly-lux-option.active,.monthly-lux-option:hover{color:#fff}
.monthly-association-card h4,.monthly-card h3,.monthly-card h4{color:#0d4c3c}
.monthly-association-card p{color:#385450!important;font-weight:800}
.monthly-association-stats span,.monthly-summary span,.monthly-import-log span{color:#3f5450!important}
.monthly-association-stats b,.monthly-summary b{color:#0d4c3c}
#monthlyFeesView .entity-meta,#monthlyFeesView .monthly-row-sub,#monthlyFeesView small{color:#3f5450!important}
#monthlyFeesTable td,#monthlyFeesView table td{color:#233b37}

/* F-04: monthly dropdowns were trapped behind later cards by the .ui-card-host isolated stacking
   context. Remove isolation for monthly cards and elevate the open dropdown so options are clickable. */
#monthlyFeesView .ui-card-host{isolation:auto!important;will-change:auto!important;transform:none!important}
#monthlyFeesView .monthly-lux-select.open{position:relative!important;z-index:9000!important}
#monthlyFeesView .monthly-lux-select.open .monthly-lux-menu{z-index:9000!important}
/* N3(v7): keep the open dropdown ABOVE all cards/buttons/entries AND stop any card/panel/controls
   ancestor from clipping the menu (was appearing "under" the buttons/items). */
#monthlyFeesView .monthly-card:has(.monthly-lux-select.open),
#monthlyFeesView .monthly-controls:has(.monthly-lux-select.open),
#monthlyFeesView .panel:has(.monthly-lux-select.open){z-index:9000!important;overflow:visible!important}
@media screen and (min-width:821px){
  #monthlyFeesView .monthly-card,
  #monthlyFeesView .monthly-controls,
  #monthlyFeesView .monthly-controls .field{overflow:visible!important}
}
