
:root{--scb-blue:#1a73e8;--scb-blue-dark:#1558b0;--scb-bg:#f5f7fb;--scb-text:#111827;--scb-muted:#667085;--scb-border:#e5e7eb;--scb-safe-bottom:env(safe-area-inset-bottom,0px)}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{color:var(--scb-text);padding-bottom:0}
button,input,select,textarea{font-size:16px;touch-action:manipulation}
button{min-height:42px}
.scb-mobile-nav,.scb-mobile-menu-button,.scb-mobile-overlay{display:none}
.scb-install-hint{display:none}
@media(max-width:780px){
  body{padding-bottom:calc(72px + var(--scb-safe-bottom))!important;overflow-x:hidden}
  body.scb-login-page{padding-bottom:0!important}
  .topbar{position:sticky!important;top:0;z-index:800;padding:11px 14px!important;min-height:54px;box-shadow:0 2px 12px rgba(0,0,0,.12)}
  .topbar>div:first-child{font-size:15px;max-width:72%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .topbar>div:last-child{display:none!important}
  .container{padding:12px!important;width:auto!important;max-width:none!important}
  .box,.card{border-radius:14px!important;padding:15px!important;margin-bottom:12px!important;box-shadow:0 2px 12px rgba(16,24,40,.08)!important}
  h1{font-size:24px}h2{font-size:20px;margin:5px 0 12px}h3{font-size:17px}
  .cards{grid-template-columns:1fr 1fr!important;gap:10px!important;margin-top:12px!important}
  .cards .card{min-height:90px!important;padding:14px!important}
  .cards .card h3{margin:0 0 6px;font-size:15px}.cards .card p{font-size:12px;margin:0;color:var(--scb-muted)}
  .grid,.grid2,.grid3,.row,.filters,.template-row,.summary,.modal-grid,.customDates{grid-template-columns:1fr!important;gap:10px!important}
  .toolbar,.actions,.row-actions,.tabs{gap:8px!important}
  .toolbar>*{max-width:none!important;width:100%!important}
  .tabs{display:grid!important;grid-template-columns:1fr 1fr!important}
  .tabs button{width:100%!important;padding:9px 7px!important;font-size:13px!important}
  input,select,textarea{min-height:44px!important;padding:11px!important}
  textarea{min-height:92px!important}
  .actions>button,.row-actions>button{flex:1 1 auto}
  .mini-btn{min-height:38px!important}
  .modalBack,.modal-bg{padding:0!important;align-items:flex-end!important}
  .modal{max-width:none!important;width:100%!important;max-height:92dvh!important;border-radius:20px 20px 0 0!important;padding-bottom:calc(12px + var(--scb-safe-bottom))!important}
  .modalBody{padding:14px!important}.modalHead{padding:14px 16px!important}
  table{box-shadow:none!important;background:transparent!important}
  table thead{display:none!important}
  table tbody,table tr,table td{display:block!important;width:100%!important;box-sizing:border-box}
  table tr{background:#fff;border:1px solid var(--scb-border);border-radius:14px;margin-bottom:10px;padding:9px 12px;box-shadow:0 1px 5px rgba(16,24,40,.05)}
  table td{border:0!important;border-bottom:1px solid #f0f2f5!important;padding:9px 0!important;min-height:32px;overflow-wrap:anywhere}
  table td:last-child{border-bottom:0!important}
  table td[data-label]::before{content:attr(data-label);display:block;font-size:11px;line-height:1.2;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:#667085;margin-bottom:4px}
  .contacts-table-wrap{max-height:none!important;overflow:visible!important}
  .deal-chip-list{min-width:0!important}.deal-chip{max-width:100%!important}
  .item{grid-template-columns:1fr!important;padding:12px!important}.item .actions{margin-top:8px}
  .group-head{padding:11px!important}
  .metric{padding:11px!important}.metric .value{font-size:20px!important}
  .search-input{max-width:none!important}

  /* Pipeline móvil: usa lista vertical y evita el Kanban comprimido */
  body.scb-pipeline-page .layout{display:block!important}
  body.scb-pipeline-page .sidebar{width:auto!important;min-width:0!important;position:static!important}
  body.scb-pipeline-page .main{width:100%!important;min-width:0!important}
  body.scb-pipeline-page .kanban-scroll,body.scb-pipeline-page #kanbanView{display:none!important}
  body.scb-pipeline-page #btnKanban{display:none!important}
  body.scb-pipeline-page #btnLista{width:100%!important}
  body.scb-pipeline-page .view-buttons{display:block!important;margin-bottom:10px!important}
  body.scb-pipeline-page #listView{display:block!important;width:100%!important;min-width:0!important}
  body.scb-pipeline-page #listView>table{width:100%!important;table-layout:fixed!important}
  body.scb-pipeline-page #listView table tr{padding:12px!important;overflow:hidden!important}
  body.scb-pipeline-page #listView table td{max-width:100%!important;overflow:hidden!important}
  body.scb-pipeline-page #listView select,body.scb-pipeline-page #listView input,body.scb-pipeline-page #listView textarea{max-width:100%!important;width:100%!important}
  body.scb-pipeline-page #listView .value-edit-wrap,body.scb-pipeline-page #listView .type-edit-wrap,body.scb-pipeline-page #listView .upload-row{display:grid!important;grid-template-columns:1fr!important}
  body.scb-pipeline-page #listView .value-input,body.scb-pipeline-page #listView .inline-select{width:100%!important}
  body.scb-pipeline-page .bulk-actions{display:none!important}
  body.scb-pipeline-page .pipeline-summary{grid-template-columns:1fr!important}
  body.scb-pipeline-page .scb-pipeline-toggle{display:flex;width:100%;justify-content:space-between;align-items:center;background:#fff;color:var(--scb-blue);border:1px solid var(--scb-blue);margin-bottom:10px;font-weight:800}
  body.scb-pipeline-page .scb-pipeline-collapsible.scb-collapsed{display:none!important}
  body.scb-pipeline-page .scb-mobile-menu-button{right:14px;bottom:calc(76px + var(--scb-safe-bottom));width:44px;height:44px}
  body.scb-pipeline-page .actions{padding-bottom:2px}
  body.scb-pipeline-page .actions>button{min-width:0!important}
  body.scb-pipeline-page #mobileStageFilterWrap{display:block!important;background:#eef4ff;border:1px solid #cfe0ff;border-radius:12px;padding:12px;margin-bottom:14px}
  body.scb-pipeline-page #mobileStageFilterWrap .deal-label{font-size:13px;font-weight:800;color:#174ea6;margin-bottom:7px}
  body.scb-pipeline-page #mobileStageFilter{font-weight:700;border-color:#1a73e8;background:#fff}

  .scb-mobile-menu-button{display:flex;position:fixed;right:14px;bottom:calc(84px + var(--scb-safe-bottom));width:48px;height:48px;border-radius:50%;z-index:910;align-items:center;justify-content:center;background:var(--scb-blue);color:#fff;border:0;box-shadow:0 5px 18px rgba(26,115,232,.4);font-size:22px;padding:0;min-height:0}
  .scb-mobile-overlay{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:920;align-items:flex-end;padding:12px 12px calc(84px + var(--scb-safe-bottom));box-sizing:border-box}
  .scb-mobile-overlay.open{display:flex}
  .scb-mobile-sheet{background:#fff;border-radius:18px;width:100%;max-height:70vh;overflow:auto;padding:12px;box-shadow:0 15px 50px rgba(0,0,0,.25)}
  .scb-mobile-sheet-title{font-weight:800;padding:6px 8px 12px}
  .scb-mobile-sheet-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .scb-mobile-sheet a{display:flex;align-items:center;gap:8px;padding:12px 10px;border-radius:11px;background:#f7f9fc;color:#1f2937;text-decoration:none;font-weight:700;font-size:13px}
  .scb-mobile-nav{display:flex;position:fixed;left:0;right:0;bottom:0;height:calc(64px + var(--scb-safe-bottom));padding:4px 6px var(--scb-safe-bottom);background:rgba(255,255,255,.97);border-top:1px solid var(--scb-border);z-index:900;box-shadow:0 -4px 16px rgba(16,24,40,.09);box-sizing:border-box;backdrop-filter:blur(10px)}
  .scb-mobile-nav a{flex:1;color:#667085;text-decoration:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:10px;font-weight:700;border-radius:10px}
  .scb-mobile-nav a .ico{font-size:20px;line-height:1}
  .scb-mobile-nav a.active{color:var(--scb-blue);background:#eef4ff}
}
@media(max-width:390px){.cards{grid-template-columns:1fr!important}.scb-mobile-sheet-grid{grid-template-columns:1fr}.scb-mobile-nav a{font-size:9px}}
