/* Phone and tablet layout. Printing retains the original document tables. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
.field,.fields>*,.heading>*,.workspace,.section-card,.settings-layout>*,.form-layout>*{min-width:0}
.field input,.field select,.field textarea{max-width:100%;min-width:0}
@media screen and (max-width:900px){
  :root{--sidebar:0px}
  .workspace{margin-left:0}
  .sidebar{inset:auto 0 0;width:100%;height:auto;padding:7px max(10px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));background:#fdfefe;border-top:1px solid #dce5ef;color:#6a819d;box-shadow:0 -3px 15px #26352006}
  .brand,.tenant-brand,.nav-label,.side-bottom,.business-switch{display:none}
  .nav{display:flex;justify-content:space-around;gap:4px}
  .nav a{flex:1;max-width:190px;min-height:51px;padding:7px 3px;display:flex;flex-direction:column;gap:3px;font-size:11px;border-radius:8px}
  .nav a[aria-current=page]{background:#e8eff8;color:#244e80}
  .nav .nav-count{display:none}
  .topbar{height:65px;padding:0 max(18px,env(safe-area-inset-right)) 0 max(18px,env(safe-area-inset-left));gap:8px}
  .topbar-right{gap:10px}.breadcrumb{font-size:10px;gap:6px}.breadcrumb>.icon,.date-label{display:none}
  .top-avatar{width:44px;height:44px;flex-shrink:0}.saved{font-size:10px;max-width:112px;line-height:1.35}
  main{padding:25px max(18px,env(safe-area-inset-right)) calc(100px + env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left))}
  .heading-actions{flex-direction:row;flex-wrap:wrap}.button,.button.small,.heading-actions .button,.icon-button,.tab,.m-presets button,.back-link{min-height:44px}
  .icon-button{width:44px;height:44px}.text-button{min-height:44px;display:inline-flex;align-items:center}
  .field input,.field select,.field textarea,.search input,.plain-select{font-size:16px;min-height:46px}
  .search{min-height:46px;padding-block:0}.search input{min-height:44px}
  .m-check,.m-mode{min-height:48px}.m-check input,.m-mode input{width:20px;height:20px}
  .m-switch{padding:11px 3px;width:48px;height:44px;flex:none}.m-switch input{width:44px;height:42px;top:0;left:0}.m-switch>span:after{top:14px;left:6px}
  dialog{max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overscroll-behavior:contain}
  .toast{left:50%;bottom:calc(86px + env(safe-area-inset-bottom));font-size:13px}
  .footer-note{margin-bottom:0}.mobile-settings{display:inline-grid}
}
@media screen and (max-width:680px){
  h1{font-size:28px}.heading>div:first-child{width:100%}.heading p.description{max-width:none;font-size:13px;line-height:1.65}
  .heading-actions{display:flex;gap:8px;margin-top:4px}.heading-actions .button{flex:1;font-size:13px;white-space:normal;padding:10px 12px}
  .button,.button.small{font-size:13px;padding:10px 14px}.button.ghost{font-size:12px}
  .stats{gap:10px}.stat{padding:15px 13px;min-height:130px}.stat-top{font-size:11px;align-items:start;gap:5px;line-height:1.4}.stat-top>.icon{width:16px;height:16px}.stat-value{font-size:clamp(17px,4.7vw,25px);letter-spacing:-.7px;white-space:normal;overflow-wrap:anywhere}.stat small{font-size:10px;line-height:1.5}
  .card-heading p,.field label,.field-label,.section-caption,.private-note,.small-note,.m-help,.m-panel-head p,.m-table-notes,.m-method-note,.m-section-label p{font-size:12px;line-height:1.65}
  .field small,.m-check small,.m-mode small{font-size:11px;line-height:1.6}.field label{font-weight:550}.field input,.field select,.field textarea{padding:11px 12px;border-radius:7px}
  .form-card h2{font-size:16px}.form-card,.m-editor-main .form-card{padding:20px 16px}
  .fields{grid-template-columns:1fr;gap:17px}.m-zone-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px!important}.m-zone-fields .field:first-child{grid-column:1/-1}.m-zone-fields label{font-size:12px}
  .quote-item{grid-template-columns:1fr 1fr;gap:13px;padding-block:20px;align-items:end}.quote-item .field:first-child{grid-column:1/-1}.quote-item .field label{font-size:12px}.quote-item>.icon-button{justify-self:end;background:#fff1f0;color:#a33838;margin-bottom:1px}
  .label-row{align-items:center;gap:8px;flex-wrap:wrap}.label-row .text-button{font-size:12px}.form-card .text-button{white-space:normal}
  .m-mode-options{grid-template-columns:1fr 1fr}.m-mode{padding:14px 10px;gap:8px}.m-mode strong,.m-check strong{font-size:12px}.m-mode input{margin-top:1px;flex-shrink:0}
  .m-panel-head h2{font-size:15px}.m-presets{display:grid;grid-template-columns:1fr 1fr;gap:8px}.m-presets button{font-size:12px;padding:9px 5px}.m-mesh h3{font-size:14px}.m-mesh p{font-size:12px}
  .m-hero{padding:23px 20px}.m-hero p{font-size:13px}.m-chips span{font-size:11px}.m-list-stats{font-size:12px}.m-list-stats span:last-child{font-size:11px}
  .m-summary-line{font-size:12px}.m-summary-line strong{font-size:13px}.m-summary>.m-help{font-size:11px}.m-summary .m-slab{width:140px}.m-summary-title{font-size:10px}
  .m-incomplete,.m-incomplete p{font-size:12px}.m-results-heading{flex-wrap:wrap}.m-results-heading h2{font-size:22px}.m-result-count{font-size:11px}
  .m-details>summary{font-size:13px;min-height:48px}.m-details>summary>span{font-size:12px}.m-detail-body{font-size:13px;overflow-wrap:anywhere}.m-detail-body .m-help{font-size:12px}.m-source-links{font-size:12px;gap:12px}
  .m-view-actions{flex-wrap:wrap;gap:12px}.m-view-actions>div{width:100%}.m-view-actions .button{font-size:13px;flex:1}.m-bottom-actions{flex-wrap:wrap}.m-bottom-actions>span{font-size:12px}.m-bottom-actions>.button{width:100%}
  .m-overview small{font-size:10px}.m-overview>div>span{font-size:12px}.m-overview strong{font-size:25px}.m-overview strong.m-overview-text{font-size:18px}
  .table-scroll{overflow:visible;min-width:0}
  .responsive-table{display:block;width:100%;min-width:0!important;white-space:normal}
  .responsive-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%)}
  .responsive-table tbody{display:grid;gap:12px;padding:0 14px 16px}
  .responsive-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 12px;border:1px solid #dfe7f0;border-radius:10px;background:#fff;padding:16px;min-width:0}
  .responsive-table td{display:block;border:0;padding:0!important;width:auto!important;min-width:0;font-size:13px;line-height:1.6;text-align:left;white-space:normal!important;overflow-wrap:anywhere}
  .responsive-table td:before{content:attr(data-label);display:block;color:#7a8da5;font-size:10px;font-weight:500;letter-spacing:.5px;text-transform:uppercase;margin-bottom:4px}
  .responsive-table td:first-child{grid-column:1/-1}.responsive-table td:first-child:before{display:none}
  .responsive-table td:last-child[data-label="Acciones"]{grid-column:1/-1;display:flex;justify-content:flex-end;border-top:1px solid #edf1f6;padding-top:8px!important;margin-top:-2px}.responsive-table td:last-child[data-label="Acciones"]:before{margin-right:auto;align-self:center;margin-bottom:0}
  .responsive-table .text-button{font-size:14px;line-height:1.5;text-align:left;white-space:normal}.quote-name{font-size:12px;max-width:none;white-space:normal;overflow:visible;margin-top:0}.quote-number{font-size:14px}
  .client-cell{gap:0}.client-cell>.avatar{display:none}.client-cell strong{font-size:13px;max-width:none;white-space:normal;overflow:visible}.client-cell small{font-size:11px}.badge{font-size:11px;padding:5px 9px}
  .m-result-table tbody{padding:14px}.m-result-table tbody tr{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 8px}.m-result-table td:first-child{font-size:15px}.m-result-table small{font-size:12px;max-width:none}.m-result-table td.amount{font-size:14px;font-weight:550}.m-result-table td.amount small{font-size:11px;font-weight:400}.m-result-table td.m-buy{border-radius:7px;padding:7px!important;margin:-7px -5px -7px 0;font-size:18px}.m-result-table td.m-buy:before{color:#3f6086}
  .m-cut-table tbody{padding:0;gap:10px}.m-cut-table td{font-size:13px}.m-cut-table td:first-child:before{display:block}.m-cut-table td:first-child{grid-column:auto}
  .detail-items tbody{padding:0}.detail-items td:first-child{font-size:14px}.detail-items td:last-child{grid-column:1/-1;text-align:right;padding-top:8px!important;border-top:1px solid #edf1f6;font-weight:600}
  .dialog-head{padding:18px 16px;align-items:start}.dialog-head h2{font-size:20px}.dialog-head p{font-size:12px}.dialog-body{padding:18px 16px}.dialog-actions{gap:8px;flex-wrap:wrap}.dialog-actions .button{flex:1;white-space:normal;min-width:110px}.dialog-actions .danger{flex-basis:100%}
  .detail-meta{display:grid;grid-template-columns:1fr;gap:16px}.detail-meta p,.detail-notes{font-size:13px;overflow-wrap:anywhere}.detail-title{gap:12px;flex-wrap:wrap}.detail-title h3{font-size:20px;overflow-wrap:anywhere}.detail-totals{max-width:none}.detail-status .field{flex-basis:100%}.detail-status>.button{width:100%}.detail-footer>div:first-child .button{flex:1}.detail-footer>div:last-child{justify-content:flex-end}
  .client-card h3{font-size:16px;overflow-wrap:anywhere}.client-details>div{font-size:13px;overflow-wrap:anywhere}.client-card-bottom{font-size:12px}.client-card-actions{gap:8px}
  .profit-layout{gap:16px}.breakdown{padding-inline:18px}.breakdown-line{font-size:13px;gap:15px}.breakdown-line>span{min-width:0}.breakdown-line strong{white-space:normal;text-align:right}.explanation{font-size:12px;padding-inline:18px}
  .expenses-list{padding-inline:16px}.expense-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px}.expense-row .expense-icon{display:none}.expense-row>div:nth-child(2){grid-column:1/-1}.expense-row strong{font-size:14px}.expense-row small{font-size:12px}.expense-row>.mono{justify-self:start}
  .backup-card p{font-size:13px}.backup-card>.button{width:100%;margin-inline:0}.demo-banner,.warning-banner{font-size:12px;flex-wrap:wrap;gap:8px}.demo-banner .button{margin-left:0;font-size:12px;white-space:normal}.topbar-right .saved{max-width:92px}
}
@media screen and (max-width:360px){
  main{padding-inline:12px}.topbar{padding-inline:12px}.breadcrumb>span:last-child,.breadcrumb>span:nth-last-child(2){display:none}.stat{padding:13px 10px}.m-mode-options{grid-template-columns:1fr}.m-summary .m-slab{display:none}
}
