/* Ajustes móviles puntuales, no modifican las versiones de escritorio. */
@media (max-width: 700px) {
  /* Inicio: SVG fluido de 6 meses, no usar min-width 600px. */
  body.mj-home .hl-chart-wrap {
    width:100%!important;min-width:0!important;
    padding:4px 6px!important;overflow-x:hidden!important;
  }
  body.mj-home .hl-chart {
    display:block!important;width:100%!important;
    min-width:0!important;max-width:100%!important;
    height:auto!important;aspect-ratio:640/270;
  }
  body.mj-home .hl-money-row {gap:5px!important;}
  body.mj-home .hl-main-grid>*{min-width:0!important;}
  body.mj-home .hl-card-head{gap:7px!important;}
  body.mj-home .hl-data-note{font-size:10px!important;}

  /* ZKTeco: domicilio a ancho completo, estado/lectura y acciones eficientes. */
  body.page-zkteco .house-top,
  body.mj-shared-sidebar-enabled .house-top {
    display:grid!important;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr)!important;
    align-items:center!important;gap:7px 10px!important;
    padding:11px!important;
  }
  body.page-zkteco .house-address,
  body.mj-shared-sidebar-enabled .house-address {
    grid-column:1/-1!important;
  }
  body.page-zkteco .house-state,
  body.mj-shared-sidebar-enabled .house-state {
    grid-column:1!important;width:auto!important;min-width:0!important;
    justify-self:start!important;
  }
  body.page-zkteco .house-last,
  body.mj-shared-sidebar-enabled .house-last {
    grid-column:2!important;min-width:0!important;
  }
  body.page-zkteco .house-actions,
  body.mj-shared-sidebar-enabled .house-actions {
    display:flex!important;grid-column:1/-1!important;
    flex-direction:row!important;flex-wrap:nowrap!important;
    align-items:stretch!important;justify-content:space-between!important;
    gap:5px!important;min-width:0!important;width:100%!important;
  }
  body.page-zkteco .house-actions>.mobile-label,
  body.mj-shared-sidebar-enabled .house-actions>.mobile-label{display:none!important}
  body.page-zkteco .house-actions>.btn,
  body.mj-shared-sidebar-enabled .house-actions>.btn{
    flex:1 1 0!important;min-width:0!important;max-width:none!important;
    padding:8px 3px!important;font-size:10px!important;
    white-space:normal!important;text-align:center!important;
    line-height:1.15!important;min-height:39px!important;
  }
  body.page-zkteco .house-top .mobile-label{font-size:9px!important;}
  body.page-zkteco .house-address span{margin-top:2px!important;}
  body.page-zkteco .house-card{border-radius:12px!important;}
  body.page-zkteco .tag-toggle{padding:8px 11px!important;}

  /* Análisis: KPI números menos pesados y donut con texto siempre en su interior. */
  body.page-analisis .metric-grid{gap:7px!important;}
  body.page-analisis .metric-grid>.metric {
    min-height:54px!important;padding:9px 10px!important;
  }
  body.page-analisis .metric-grid>.metric :is(small,strong){
    line-height:1.15!important;letter-spacing:-.025em!important;
  }
  body.page-analisis .metric-grid>.metric strong {
    font-size:clamp(14px,3.7vw,19px)!important;font-weight:750!important;
  }
  body.page-analisis .donut-wrapper{
    display:grid!important;grid-template-columns:1fr!important;
    justify-items:center!important;gap:12px!important;min-height:0!important;
  }
  body.page-analisis .donut{
    width:min(198px,75vw)!important;height:auto!important;
    aspect-ratio:1!important;display:grid!important;place-items:center!important;
  }
  body.page-analisis .donut:before{inset:25%!important;}
  body.page-analisis .donut>div{
    position:relative!important;z-index:1!important;
    width:48%!important;height:48%!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
    flex-direction:column!important;gap:2px!important;
    font-size:clamp(23px,6vw,30px)!important;line-height:1!important;
  }
  body.page-analisis .donut small {
    font-size:10px!important;line-height:1.12!important;
    white-space:normal!important;max-width:100%!important;
  }
  body.page-analisis .legend-block{
    display:flex!important;flex-wrap:wrap!important;justify-content:center!important;
    gap:10px!important;line-height:1.5!important;
  }

  /* Casa Club: cinco indicadores son píldoras de etiqueta + cifra. */
  body.page-club #tab-administracion #clubTotals.stat-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;
  }
  body.page-club #tab-administracion #clubTotals.stat-grid .stat{
    display:flex!important;flex-direction:row!important;align-items:center!important;
    justify-content:space-between!important;
    min-height:56px!important;height:auto!important;
    padding:10px!important;gap:7px!important;
  }
  body.page-club #tab-administracion #clubTotals.stat-grid .stat small{
    flex:1 1 auto!important;min-width:0!important;
    font-size:11px!important;line-height:1.2!important;
  }
  body.page-club #tab-administracion #clubTotals.stat-grid .stat strong{
    flex:0 0 auto!important;margin:0!important;
    font-size:clamp(14px,3.7vw,19px)!important;
    font-weight:750!important;text-align:right!important;
  }

  /* Conmutador: todas las calles quedan visibles sin scroll lateral. */
  body.page-conmutador .street-tabs,
  body.mj-shared-sidebar-enabled .street-tabs {
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:4px!important;padding:6px!important;overflow:visible!important;
  }
  body.page-conmutador .street-tab,
  body.mj-shared-sidebar-enabled .street-tab {
    min-width:0!important;width:100%!important;min-height:40px!important;
    padding:7px 5px!important;font-size:12px!important;
    border:1px solid #e2e6ec!important;border-radius:9px!important;
    white-space:normal!important;line-height:1.15!important;
  }
  body.page-conmutador .street-tab.active,
  body.mj-shared-sidebar-enabled .street-tab.active{
    background:#fff3e6!important;border-color:#df922e!important;
    box-shadow:inset 0 0 0 1px #e7b36c!important;
  }
  body.page-conmutador .street-tab.active:after,
  body.mj-shared-sidebar-enabled .street-tab.active:after{display:none!important}
  body.page-conmutador .house-grid,
  body.mj-shared-sidebar-enabled .house-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px!important;
  }
  body.page-conmutador .house-btn.exterior,
  body.mj-shared-sidebar-enabled .house-btn.exterior{grid-column:span 1!important;}

  /* Seguridad y Visitas: aire leve a ambos lados del tablero. */
  body.page-seguridad-v2 .metric-grid,
  body.page-visitas-v2 .metric-grid{
    box-sizing:border-box!important;
    padding-inline:10px!important;margin-inline:0!important;
  }
}
@media(max-width:380px){
  body.page-club #tab-administracion #clubTotals.stat-grid .stat{
    padding:8px!important;
  }
  body.page-conmutador .street-tabs,
  body.mj-shared-sidebar-enabled .street-tabs{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}

/* Estado de cuotas: tabla accesible, compacta en móvil, nunca muestra identidad. */
#seguridadCuotasPanel {margin-top:14px!important}
#seguridadCuotasPanel .seg-cuotas-filters {
 display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;
 padding:10px 14px;
}
#seguridadCuotasPanel .seg-cuotas-filters label{font-size:11px;font-weight:750;color:#62738a}
#seguridadCuotasPanel .seg-cuotas-filters :is(input,select){
 width:100%;min-width:0;min-height:40px;margin-top:4px;padding:7px 10px;
 border:1px solid #dce4ed;border-radius:9px;background:#fff;color:#24364d;
}
#seguridadCuotasPanel .seg-cuotas-message{margin:7px 14px;font-size:11px;color:#718098}
#seguridadCuotasPanel .seg-cuotas-scroll{max-width:100%;overflow-x:auto;padding:0 14px}
#seguridadCuotasPanel .seg-cuotas-table{width:100%;border-collapse:collapse;font-size:11px}
#seguridadCuotasPanel .seg-cuotas-table :is(th,td){
 text-align:left;border-bottom:1px solid #e9edf2;padding:10px 8px;
}
#seguridadCuotasPanel .seg-cuotas-table th{color:#62738a;background:#fbf8fd}
#seguridadCuotasPanel .seg-cuotas-pill{
 display:inline-block;border-radius:7px;padding:5px 8px;font-size:10px;font-weight:800;
}
#seguridadCuotasPanel .seg-cuotas-pill.paid{color:#28734d;background:#e5f6eb}
#seguridadCuotasPanel .seg-cuotas-pill.due{color:#a75c29;background:#fff0e1}
#seguridadCuotasPanel .seg-cuotas-pill.unknown{color:#5b6b80;background:#edf1f6}
#seguridadCuotasPanel .seg-cuotas-pagination{
 display:flex;gap:10px;align-items:center;justify-content:flex-end;
 padding:12px 14px;font-size:11px;color:#66758b;
}
/* Hoja externa: vista previa acotada sin hacer scroll de todo el portal. */
#sheetsHistoricos .sheets-controls{
 display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:end;gap:9px;margin:12px 0;
}
#sheetsHistoricos .sheets-controls label{font-size:11px;color:#65738a;font-weight:750}
#sheetsHistoricos .sheets-controls select{
 width:100%;height:42px;padding:9px;border:1px solid #dce4ed;border-radius:10px;
}
#sheetsHistoricos #sheetsStatus{font-size:11px;color:#67758c}
#sheetsHistoricos table{min-width:max-content}
@media(max-width:700px){
 #seguridadCuotasPanel .seg-cuotas-filters{
   grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:10px!important;
 }
 #seguridadCuotasPanel .seg-cuotas-filters label:last-child{grid-column:1/-1}
 #seguridadCuotasPanel .seg-cuotas-scroll{padding:0 10px}
 #seguridadCuotasPanel .seg-cuotas-table{min-width:0;width:100%}
 #seguridadCuotasPanel .seg-cuotas-table thead{display:none}
 #seguridadCuotasPanel .seg-cuotas-table tbody{display:grid;gap:8px}
 #seguridadCuotasPanel .seg-cuotas-table tr{
   display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;
   padding:10px;border:1px solid #e3e9f1;border-radius:11px;background:#fff;
 }
 #seguridadCuotasPanel .seg-cuotas-table tr td{
   padding:0!important;border:0!important;min-width:0;
   overflow-wrap:anywhere;
 }
 #seguridadCuotasPanel .seg-cuotas-table td:before{
   content:attr(data-label);display:block;margin:0 0 3px;
   color:#8b97a8;font-size:9px;font-weight:850;
 }
 #seguridadCuotasPanel .seg-cuotas-pagination{
   justify-content:space-between;padding:10px;gap:5px;
 }
 #seguridadCuotasPanel .seg-cuotas-pagination .btn{
   min-height:36px;padding:7px 9px;font-size:11px;
 }
 #sheetsHistoricos .sheets-controls{grid-template-columns:1fr!important;gap:8px}
 #sheetsHistoricos .sheets-controls button{width:100%;min-height:41px}
}

@media(max-width:700px) {
  /* Directorio: fichas sin íconos, menos scroll y datos compactos. */
  body.page-directorio .directory-grid .directory-card,
  body.page-directorio.mj-shared-sidebar-enabled .directory-grid .directory-card {
    padding:12px!important;min-height:0!important;max-height:none!important;
    display:flex!important;flex-direction:column!important;gap:7px!important;
  }
  body.page-directorio .directory-card>.icon,
  body.page-directorio .profile>.icon {display:none!important;}
  body.page-directorio .directory-card h3{font-size:17px!important;margin:0!important}
  body.page-directorio .directory-card p{
    font-size:11px!important;line-height:1.35!important;
    margin:0!important;max-height:3em!important;overflow:hidden!important;
  }
  body.page-directorio .directory-card .meta{
    display:grid!important;grid-template-columns:1fr!important;
    gap:4px!important;margin:0!important;padding:0!important;
  }
  body.page-directorio .directory-card .meta-row{
    display:flex!important;flex-direction:row!important;
    justify-content:space-between!important;gap:9px!important;
    font-size:11px!important;line-height:1.3!important;margin:0!important;
  }
  body.page-directorio .directory-card .meta-row span{flex:0 0 auto!important}
  body.page-directorio .directory-card .meta-row strong{
    min-width:0!important;text-align:right!important;overflow-wrap:anywhere!important;
  }
  body.page-directorio .directory-card .chips{display:none!important;}
  body.page-directorio .directory-card .actions{margin-top:4px!important;}

  /* Análisis: fichas de vivienda más densas; filas de etiqueta y valor. */
  body.page-analisis.mj-shared-sidebar-enabled .houses-scroll tbody tr{
    gap:5px 11px!important;padding:9px!important;
  }
  body.page-analisis.mj-shared-sidebar-enabled .houses-scroll tbody td{
    display:flex!important;align-items:center!important;
    flex-wrap:wrap!important;gap:4px!important;
    line-height:1.25!important;font-size:11px!important;
  }
  body.page-analisis.mj-shared-sidebar-enabled .houses-scroll tbody td[data-label]::before{
    display:inline!important;margin:0!important;font-size:9px!important;
  }
  body.page-analisis.mj-shared-sidebar-enabled .houses-scroll tbody td:nth-child(3){
    grid-column:1/-1!important;
  }
  body.page-analisis.mj-shared-sidebar-enabled .houses-scroll tbody td:nth-child(4){
    grid-column:1/-1!important;
    justify-content:space-between!important;
  }
}


/* Seguridad: quitar el hueco provocado por Administración dentro de la columna
   lateral. Cuotas se muestra inmediatamente después de cámaras + pluma. */
body.page-seguridad-v2 .dashboard {
  align-items:start!important;
  gap:12px!important;
  margin-bottom:0!important;
}
body.page-seguridad-v2 #seguridadCuotasPanel {
  margin-top:12px!important;
}
body.page-seguridad-v2 .security-contact-compact {
  display:grid!important;
  grid-template-columns:minmax(125px,.48fr) minmax(190px,1fr) auto!important;
  align-items:center!important;
  gap:12px!important;
  padding:12px 16px!important;
  margin:10px 0 0!important;
  border-radius:15px!important;
  box-shadow:0 4px 16px rgba(35,47,68,.04)!important;
}
body.page-seguridad-v2 .security-contact-heading .eyebrow {
  display:block!important;
  font-size:9px!important;
  letter-spacing:.07em!important;
}
body.page-seguridad-v2 .security-contact-heading h3 {
  margin:3px 0 0!important;
  font-size:14px!important;
  line-height:1.2!important;
}
body.page-seguridad-v2 .security-contact-compact .admin-list {
  margin:0!important;
  min-width:0!important;
  gap:0!important;
}
body.page-seguridad-v2 .security-contact-compact .admin-row {
  min-width:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  gap:8px!important;
}
body.page-seguridad-v2 .security-contact-compact .admin-row>div {
  min-width:0!important;
}
body.page-seguridad-v2 .security-contact-compact .admin-row b {
  font-size:11px!important;
  line-height:1.3!important;
}
body.page-seguridad-v2 .security-contact-compact .admin-row small {
  display:block!important;
  margin-top:2px!important;
  font-size:10px!important;
}
body.page-seguridad-v2 .security-contact-compact .admin-avatar {
  width:31px!important;
  height:31px!important;
  flex:0 0 31px!important;
  border-radius:9px!important;
}
body.page-seguridad-v2 .security-contact-compact .actions {
  display:flex!important;
  gap:7px!important;
  align-items:center!important;
}
body.page-seguridad-v2 .security-contact-compact .actions>.btn {
  min-width:84px!important;
  min-height:35px!important;
  flex:0 0 auto!important;
  padding:7px 12px!important;
  font-size:11px!important;
}
@media(max-width:1050px) {
  body.page-seguridad-v2 .security-contact-compact {
    grid-template-columns:minmax(125px,.48fr) minmax(170px,1fr) auto!important;
  }
}
@media(max-width:700px) {
  body.page-seguridad-v2 .security-contact-compact {
    grid-template-columns:minmax(0,1fr) auto!important;
    padding:11px 12px!important;
    gap:8px 10px!important;
  }
  body.page-seguridad-v2 .security-contact-heading {
    grid-column:1/-1!important;
  }
  body.page-seguridad-v2 .security-contact-heading h3 {
    font-size:13px!important;
  }
  body.page-seguridad-v2 .security-contact-compact .actions {
    justify-content:flex-end!important;
    flex-wrap:wrap!important;
  }
  body.page-seguridad-v2 .security-contact-compact .actions>.btn {
    min-width:70px!important;
    padding:7px 8px!important;
    font-size:10px!important;
  }
}

/* Análisis de cuotas: fichas móviles con una sola estructura por campo.
   Cada fila presenta ETIQUETA (izquierda) y VALOR (derecha), incluidos
   los ocho campos actuales de viviendas y los cinco de egresos.
   Esta hoja se carga al final mediante site-sidebar.js, por lo que aquí
   anulamos expresamente las rejillas antiguas de 3 filas / 6 campos. */
@media(max-width:700px){
  body.page-analisis.mj-shared-sidebar-enabled .houses-scroll #financeHouseRows>tr:not(:has(td[colspan])),
  body.page-analisis.mj-shared-sidebar-enabled .expense-table-scroll #financeExpenseRows>tr:not(:has(td[colspan])){
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:none!important;
    grid-template-areas:none!important;
    gap:0!important;
    padding:10px 13px!important;
    min-width:0!important;
    align-items:stretch!important;
  }

  body.page-analisis.mj-shared-sidebar-enabled .houses-scroll #financeHouseRows>tr>td:not([colspan]),
  body.page-analisis.mj-shared-sidebar-enabled .expense-table-scroll #financeExpenseRows>tr>td:not([colspan]){
    box-sizing:border-box!important;
    display:grid!important;
    grid-area:auto!important;
    grid-column:1/-1!important;
    grid-template-columns:minmax(0,41%) minmax(0,1fr)!important;
    align-items:center!important;
    justify-content:normal!important;
    column-gap:10px!important;
    min-width:0!important;
    max-width:none!important;
    width:100%!important;
    margin:0!important;
    padding:7px 0!important;
    border:0!important;
    border-bottom:1px solid #edf1f6!important;
    text-align:left!important;
    font-size:11px!important;
    line-height:1.4!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
  body.page-analisis.mj-shared-sidebar-enabled .houses-scroll #financeHouseRows>tr>td:not([colspan]):last-child,
  body.page-analisis.mj-shared-sidebar-enabled .expense-table-scroll #financeExpenseRows>tr>td:not([colspan]):last-child{
    border-bottom:0!important;
  }
  body.page-analisis.mj-shared-sidebar-enabled .houses-scroll #financeHouseRows>tr>td[data-label]::before,
  body.page-analisis.mj-shared-sidebar-enabled .expense-table-scroll #financeExpenseRows>tr>td[data-label]::before{
    content:attr(data-label)!important;
    display:block!important;
    grid-column:1!important;
    width:auto!important;
    margin:0!important;
    color:#78879b!important;
    font-size:10px!important;
    line-height:1.4!important;
    font-weight:750!important;
    text-align:left!important;
    white-space:normal!important;
    align-self:center!important;
    justify-self:start!important;
  }
  body.page-analisis.mj-shared-sidebar-enabled .houses-scroll #financeHouseRows .house-field-value,
  body.page-analisis.mj-shared-sidebar-enabled .expense-table-scroll #financeExpenseRows .expense-field-value{
    display:block!important;
    grid-column:2!important;
    min-width:0!important;
    width:auto!important;
    margin:0!important;
    justify-self:end!important;
    align-self:center!important;
    font-size:11px!important;
    line-height:1.4!important;
    font-weight:800!important;
    color:#2b3b54!important;
    text-align:right!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    font-variant-numeric:tabular-nums;
  }
  body.page-analisis.mj-shared-sidebar-enabled .houses-scroll #financeHouseRows .house-amount{
    display:inline!important;
    margin:0!important;
    font-variant-numeric:tabular-nums!important;
    text-align:right!important;
  }
  body.page-analisis.mj-shared-sidebar-enabled .houses-scroll #financeHouseRows .status-paid,
  body.page-analisis.mj-shared-sidebar-enabled .houses-scroll #financeHouseRows .status-pending{
    display:inline-flex!important;
    align-items:center!important;
    margin:0!important;
    max-width:100%!important;
    padding:4px 8px!important;
    font-size:10px!important;
  }
  body.page-analisis.mj-shared-sidebar-enabled .houses-scroll #financeHouseRows .house-tags-button{
    max-width:100%!important;
    justify-content:center!important;
    text-align:center!important;
    white-space:nowrap!important;
  }
}


/* Análisis de cuotas · móvil: formulario 2×2 sin desbordamiento del date picker
   de Safari/iOS y porcentaje completamente dentro del centro de la dona. */
@media(max-width:700px){
  body.page-analisis #newExpense.expense-form{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-rows:auto auto auto auto!important;
    align-items:start!important;
    gap:12px 10px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
  body.page-analisis #newExpense.expense-form>label{
    display:block!important;
    grid-column:auto!important;
    min-width:0!important;
    max-width:100%!important;
    width:100%!important;
    margin:0!important;
    overflow:visible!important;
    font-size:11px!important;
  }
  body.page-analisis #newExpense.expense-form>label:nth-of-type(1){grid-column:1!important;grid-row:1!important}
  body.page-analisis #newExpense.expense-form>label:nth-of-type(2){grid-column:2!important;grid-row:1!important}
  body.page-analisis #newExpense.expense-form>label:nth-of-type(3){grid-column:1!important;grid-row:2!important}
  body.page-analisis #newExpense.expense-form>label:nth-of-type(4){grid-column:2!important;grid-row:2!important}
  body.page-analisis #newExpense.expense-form>label>input,
  body.page-analisis #newExpense.expense-form>label>select{
    display:block!important;
    box-sizing:border-box!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:44px!important;
    height:44px!important;
    margin-top:6px!important;
    padding:8px 10px!important;
    font-size:16px!important;
    line-height:1.2!important;
  }
  body.page-analisis #newExpense #expenseDate{
    min-width:0!important;
    max-width:100%!important;
    padding-inline:6px!important;
    font-size:clamp(13px,3.6vw,16px)!important;
    letter-spacing:-.03em!important;
    -webkit-min-logical-width:0;
  }
  body.page-analisis #newExpense #expenseConcept{
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.page-analisis #newExpense.expense-form>.expense-reference-note{
    grid-column:1/-1!important;grid-row:3!important;
    min-width:0!important;width:100%!important;
  }
  body.page-analisis #newExpense.expense-form>#saveExpense{
    grid-column:1/-1!important;grid-row:4!important;
    width:100%!important;min-height:45px!important;
  }

  body.page-analisis #financeDonut.donut{
    display:grid!important;
    place-items:center!important;
    width:min(198px,64vw)!important;
    height:auto!important;
    aspect-ratio:1!important;
    margin-inline:auto!important;
  }
  body.page-analisis #financeDonut.donut::before{
    inset:22%!important;
    border-radius:50%!important;
  }
  body.page-analisis #financeDonutText{
    position:relative!important;
    z-index:1!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    align-items:center!important;
    gap:3px!important;
    box-sizing:border-box!important;
    width:54%!important;
    max-width:54%!important;
    height:auto!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    font-size:clamp(16px,4.5vw,21px)!important;
    font-weight:900!important;
    line-height:1.08!important;
    letter-spacing:-.04em!important;
    white-space:nowrap!important;
    text-align:center!important;
  }
  body.page-analisis #financeDonutText small{
    display:block!important;
    max-width:100%!important;
    font-size:9px!important;
    font-weight:650!important;
    letter-spacing:0!important;
    white-space:normal!important;
    text-align:center!important;
  }
}

/* Safari iOS: input[type=date] puede declarar un ancho intrínseco y altura
   mayor a su columna aun con width:100%. La superficie visual se pinta aquí
   y el date picker NATIVO queda interactivo dentro de un recorte fijo. */
@media(max-width:700px){
  body.page-analisis #newExpense .mj-date-control,
  body.page-analisis .expense-filters .mj-date-control{
    display:block!important;
    position:relative!important;
    isolation:isolate!important;
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:44px!important;
    min-height:44px!important;
    max-height:44px!important;
    margin:6px 0 0!important;
    overflow:hidden!important;
    border:1px solid #d8e1ed!important;
    border-radius:11px!important;
    background:#fff!important;
  }
  body.page-analisis #newExpense .mj-date-control>.mj-date-display,
  body.page-analisis .expense-filters .mj-date-control>.mj-date-display{
    display:flex!important;
    position:absolute!important;
    inset:0!important;
    z-index:0!important;
    align-items:center!important;
    box-sizing:border-box!important;
    width:100%!important;
    height:100%!important;
    min-width:0!important;
    max-width:100%!important;
    padding:0 31px 0 10px!important;
    overflow:hidden!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
    color:#2d3d59!important;
    font-size:clamp(12px,3.5vw,14px)!important;
    line-height:1.2!important;
    font-weight:750!important;
    pointer-events:none!important;
  }
  body.page-analisis .mj-date-control>.mj-date-display.is-empty{
    color:#8a96a7!important;
    font-weight:600!important;
  }
  body.page-analisis #newExpense .mj-date-control>.mj-date-display::after,
  body.page-analisis .expense-filters .mj-date-control>.mj-date-display::after{
    content:""!important;
    position:absolute!important;
    right:10px!important;
    top:50%!important;
    width:16px!important;
    height:16px!important;
    transform:translateY(-50%)!important;
    background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%237c6b94' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M7 3v4M17 3v4M3 10h18'/%3E%3C/svg%3E")!important;
  }
  body.page-analisis #newExpense .mj-date-control>input[type="date"],
  body.page-analisis .expense-filters .mj-date-control>input[type="date"]{
    display:block!important;
    position:absolute!important;
    inset:0!important;
    z-index:1!important;
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:100%!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    opacity:0!important;
    font-size:16px!important;
    cursor:pointer!important;
    pointer-events:auto!important;
    /* Mantener la apariencia/función interna del picker de Safari. */
    -webkit-min-logical-width:0;
  }
  body.page-analisis .mj-date-control:focus-within{
    border-color:#a18acc!important;
    outline:2px solid #e5d9f5!important;
    outline-offset:1px!important;
  }
  /* El date picker ocupa el interior del contenedor aunque el texto nativo
     de WebKit tenga dimensiones propias. El recorte impide invasiones externas. */
  body.page-analisis #newExpense>label,
  body.page-analisis .expense-filters>label{
    min-width:0!important;
    max-width:100%!important;
  }
}
