:root{--bottom-nav-h:0px;}
@media (max-width: 767.98px){
  main.app-content{
    padding-top:1rem;
    padding-bottom:calc(var(--bottom-nav-h, 56px) + 12px);
  }
  .mob-logout-btn{
    position:absolute;
    right:12px;
    top:8px;
    font-size:12px;
    padding:6px 10px;
    border-radius:9999px;
    background:rgba(0,0,0,.05);
    text-decoration:none;
  }
  .row > [class^="col"],
  .row > [class*=" col"]{
    flex: 0 0 100%;
    max-width: 100%;
  }
  .card,
  .table-responsive-block tr{
    margin-bottom: clamp(12px,3vw,20px);
  }
  input,select,textarea,button,.btn{
    min-height:44px;
  }
  .form-control:focus,
  .form-select:focus{
    box-shadow:0 0 0 .25rem rgba(var(--bs-primary-rgb),.25);
  }
  .form-text{white-space:normal;}
  .table-responsive-block thead{display:none;}
  .table-responsive-block tr{
    display:block;
    border:1px solid #dee2e6;
    border-radius:.5rem;
  }
  .table-responsive-block td{
    display:block;
    padding:.5rem 1rem;
  }
  .table-responsive-block td::before{
    content:attr(data-label);
    display:block;
    font-weight:600;
    opacity:.7;
    margin-bottom:.25rem;
  }
  .mob-file-input label{cursor:pointer;}
  .mob-file-input .btn{width:100%;}
  #file-name{word-break:break-all;}
  body.mob-keyboard .bottom-nav{position:static;}
  .bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:1050;padding-bottom:env(safe-area-inset-bottom);}
  .amount{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .amount-oneline{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:clamp(10px,2.8vw,12px);min-width:0;}
  textarea{width:100%;box-sizing:border-box;word-break:break-all;max-height:200px;}
  .calendar-table{padding-inline:clamp(8px,3vw,16px);} 
  .calendar-table table{width:100%;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;}
  .calendar-table thead,.calendar-table tbody,.calendar-table tr{display:contents;}
  .calendar-table td{min-height:40px;font-size:clamp(11px,3.2vw,14px);overflow-wrap:anywhere;padding:.25rem;border:1px solid #dee2e6;border-radius:.25rem;}
  .calendar-table td.bg-light{background:#f8f9fa;}
  .calendar-table td a{display:block;}
  .only-mobile{display:block;}
  .only-desktop{display:none;}
  .budget-page{
    display:flex;
    flex-direction:column;
    min-height:100dvh;
    padding-bottom: calc(var(--bottom-nav-h,56px) + env(safe-area-inset-bottom));
  }
  .budget-list{
    /* preserve existing layout */
  }
}
@media (min-width: 768px){
  .only-mobile{display:none;}
  .only-desktop{display:initial;}
}
@media (prefers-reduced-motion: reduce){
  *{animation:none!important;transition:none!important;}
}
