/* V6.3.1 — Categorias mobile baseadas no mockup validado. */
@media(max-width:820px){
  #categories{padding-bottom:110px}
  .gf-cat-mobile{display:flex;flex-direction:column;gap:12px}
  .gf-cat-searchbar{display:grid;grid-template-columns:minmax(0,1fr) 46px;gap:10px;align-items:center}
  .gf-cat-search{min-height:46px;border:1px solid #d0d5dd;border-radius:14px;background:#fff;display:grid;grid-template-columns:20px 1fr;align-items:center;gap:8px;padding:0 13px;color:#667085}
  .gf-cat-search svg,.gf-cat-add svg,.gf-cat-chip-icon svg,.gf-cat-group-icon svg,.gf-cat-item-icon svg,.gf-cat-actions svg,.gf-cat-sheet svg{width:20px;height:20px}
  .gf-cat-search input{border:0;outline:0;background:transparent;font:inherit;color:#101828;min-width:0;width:100%}
  .gf-cat-add{width:46px;height:46px;border:0;border-radius:14px;background:#1570ef;color:#fff;display:grid;place-items:center;box-shadow:0 4px 12px rgba(21,112,239,.22)}
  .gf-cat-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:4px;background:#f2f4f7;border-radius:13px}
  .gf-cat-tabs button{min-height:38px;border:0;border-radius:10px;background:transparent;color:#667085;font-weight:800;font-size:12px}
  .gf-cat-tabs button span{font-weight:700;opacity:.7}
  .gf-cat-tabs button.active{background:#fff;color:#175cd3;box-shadow:0 1px 4px rgba(16,24,40,.08)}
  .gf-cat-group-chips{display:flex;gap:8px;overflow-x:auto;padding:1px 1px 4px;scrollbar-width:none}
  .gf-cat-group-chips::-webkit-scrollbar{display:none}
  .gf-cat-group-chip{flex:0 0 auto;min-width:82px;border:1px solid #eaecf0;border-radius:14px;background:#fff;padding:8px 10px;display:grid;grid-template-columns:auto 1fr auto;gap:5px;align-items:center;color:#475467;font-size:11px;font-weight:800}
  .gf-cat-group-chip.active{border-color:#84adff;background:#eff4ff;color:#175cd3}
  .gf-cat-chip-icon{width:28px;height:28px;border-radius:9px;background:#f2f4f7;display:grid;place-items:center}
  .gf-cat-group-chip.active .gf-cat-chip-icon{background:#dbeafe}
  .gf-cat-group-chip small{font-size:10px;font-weight:900}
  .gf-cat-results{display:flex;flex-direction:column;gap:12px}
  .gf-cat-group{border:1px solid #eaecf0;border-radius:17px;background:#fff;overflow:hidden;box-shadow:0 1px 2px rgba(16,24,40,.04)}
  .gf-cat-group-head{width:100%;min-height:46px;border:0;padding:10px 12px;background:#f9fafb;display:grid;grid-template-columns:32px minmax(0,1fr) auto auto;gap:8px;align-items:center;text-align:left;color:#344054}
  .gf-cat-group-head.static{grid-template-columns:32px minmax(0,1fr) auto}
  .gf-cat-group-head strong{font-size:14px;color:#101828}
  .gf-cat-group-head>span:nth-of-type(2){font-size:11px;color:#667085}
  .gf-cat-group-head b{font-size:16px;color:#667085}
  .gf-cat-group-icon{width:32px;height:32px;border-radius:10px;background:#eef4ff;color:#175cd3;display:grid;place-items:center}
  .gf-cat-group.system .gf-cat-group-icon{background:#f2f4f7;color:#667085}
  .gf-cat-group-body[hidden]{display:none}
  .gf-cat-item{min-height:58px;display:grid;grid-template-columns:minmax(0,1fr) 46px;align-items:stretch;border-top:1px solid #f2f4f7}
  .gf-cat-item:first-child{border-top:0}
  .gf-cat-item-main{border:0;background:#fff;display:grid;grid-template-columns:38px minmax(0,1fr);gap:10px;align-items:center;text-align:left;padding:9px 6px 9px 12px}
  .gf-cat-item-icon{width:38px;height:38px;border-radius:12px;background:#fff4ed;color:#ec4a0a;display:grid;place-items:center}
  .gf-cat-item-copy{min-width:0}
  .gf-cat-item-copy strong{display:block;color:#101828;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .gf-cat-item-copy span{display:block;margin-top:2px;color:#667085;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .gf-cat-item.archived .gf-cat-item-main,.gf-cat-item.archived .gf-cat-menu{opacity:.6}
  .gf-cat-menu{border:0;background:#fff;color:#475467;font-size:18px;font-weight:900;letter-spacing:1px}
  .gf-cat-item.system{grid-template-columns:38px minmax(0,1fr);gap:10px;padding:10px 12px;align-items:center}
  .gf-cat-item.system .gf-cat-item-icon{background:#f2f4f7;color:#667085}
  .gf-cat-empty{padding:28px 16px;text-align:center;border:1px dashed #d0d5dd;border-radius:16px;background:#fff;color:#667085}
  .gf-cat-empty strong,.gf-cat-empty span{display:block}.gf-cat-empty strong{color:#344054;margin-bottom:5px}

  .gf-cat-action-layer{position:fixed;inset:0;z-index:240;background:rgba(15,23,42,.16)}
  .gf-cat-actions{position:absolute;width:min(290px,calc(100vw - 24px));background:#fff;border:1px solid #eaecf0;border-radius:15px;box-shadow:0 14px 40px rgba(16,24,40,.22);overflow:hidden}
  .gf-cat-actions-title{padding:12px 14px;background:#f9fafb;border-bottom:1px solid #eaecf0}
  .gf-cat-actions-title strong,.gf-cat-actions-title span{display:block}.gf-cat-actions-title strong{font-size:13px}.gf-cat-actions-title span{font-size:10px;color:#667085;margin-top:2px}
  .gf-cat-actions button{width:100%;min-height:48px;border:0;border-top:1px solid #f2f4f7;background:#fff;display:grid;grid-template-columns:22px 1fr;gap:10px;align-items:center;text-align:left;padding:0 14px;color:#344054;font-weight:750}
  .gf-cat-actions button:first-of-type{border-top:0}.gf-cat-actions button.danger{color:#d92d20}

  .gf-cat-sheet-layer{position:fixed;inset:0;z-index:250;background:rgba(15,23,42,.45);display:flex;align-items:flex-end;padding:0}
  .gf-cat-sheet{width:100%;max-height:min(88vh,760px);background:#fff;border-radius:24px 24px 0 0;box-shadow:0 -18px 48px rgba(15,23,42,.28);display:flex;flex-direction:column;padding-bottom:calc(12px + env(safe-area-inset-bottom))}
  .gf-cat-sheet-handle{width:42px;height:4px;border-radius:999px;background:#d0d5dd;margin:8px auto 2px;flex:0 0 auto}
  .gf-cat-sheet-head{display:grid;grid-template-columns:1fr 38px;gap:8px;align-items:center;padding:10px 16px 8px}
  .gf-cat-sheet-head h2{margin:0;font-size:18px;color:#101828}
  .gf-cat-sheet-head button{width:36px;height:36px;border:0;border-radius:999px;background:#f2f4f7;color:#475467;display:grid;place-items:center}
  .gf-cat-sheet-body{padding:4px 16px 8px;overflow:auto}
  .gf-cat-sheet-actions{padding:8px 16px 0;display:grid;gap:8px}
  .gf-cat-field{margin-bottom:14px}.gf-cat-field label{display:block;margin-bottom:6px;font-size:12px;font-weight:800;color:#344054}
  .gf-cat-field .input,.gf-cat-field .select{width:100%;min-height:48px;border-radius:12px}
  .gf-cat-switch-row{min-height:62px;border-top:1px solid #f2f4f7;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px 0}
  .gf-cat-switch-row strong,.gf-cat-switch-row small{display:block}.gf-cat-switch-row strong{font-size:13px;color:#344054}.gf-cat-switch-row small{font-size:10px;color:#98a2b3;margin-top:3px;line-height:1.35}
  .gf-cat-switch-row.disabled{opacity:.45}.gf-cat-switch{position:relative;width:46px;height:26px}.gf-cat-switch input{position:absolute;opacity:0;pointer-events:none}.gf-cat-switch i{position:absolute;inset:0;background:#e4e7ec;border-radius:999px;transition:.18s}.gf-cat-switch i::after{content:'';position:absolute;width:22px;height:22px;top:2px;left:2px;border-radius:50%;background:#fff;box-shadow:0 1px 4px rgba(16,24,40,.25);transition:.18s}.gf-cat-switch input:checked+i{background:#12b76a}.gf-cat-switch input:checked+i::after{transform:translateX(20px)}
  .gf-cat-info,.gf-cat-warning{margin-top:10px;border-radius:12px;padding:11px 12px;font-size:11px;line-height:1.45}.gf-cat-info{background:#eff8ff;color:#175cd3}.gf-cat-warning{background:#fff6ed;color:#b54708}
  .gf-cat-sheet-primary,.gf-cat-sheet-secondary{width:100%;min-height:48px;border-radius:13px;font-weight:850}.gf-cat-sheet-secondary{background:#fff;border:1px solid #d0d5dd;color:#344054}
  .gf-cat-merge-source{border:1px solid #eaecf0;border-radius:13px;padding:11px 12px;margin-bottom:14px;background:#f9fafb}.gf-cat-merge-source small,.gf-cat-merge-source strong,.gf-cat-merge-source span{display:block}.gf-cat-merge-source small{font-size:10px;color:#667085}.gf-cat-merge-source strong{margin-top:3px;font-size:14px}.gf-cat-merge-source span{margin-top:2px;font-size:10px;color:#667085}
  .gf-cat-delete-icon{width:58px;height:58px;border-radius:50%;margin:8px auto 10px;background:#fee4e2;color:#d92d20;display:grid;place-items:center}.gf-cat-delete-icon svg{width:27px;height:27px}.gf-cat-delete-copy{text-align:center}.gf-cat-delete-copy h3{margin:0 0 6px;font-size:17px}.gf-cat-delete-copy p{margin:0;color:#667085;font-size:12px;line-height:1.45}
  body.gf-cat-sheet-open{overflow:hidden}
}
